mirror of
https://github.com/schollz/hostyoself.git
synced 2026-01-23 02:15:14 +00:00
make the host run forever
This commit is contained in:
parent
8ff76da85e
commit
bd01535efa
1 changed files with 9 additions and 1 deletions
10
main.go
10
main.go
|
|
@ -92,7 +92,15 @@ func host(c *cli.Context) (err error) {
|
|||
if err != nil {
|
||||
return
|
||||
}
|
||||
return cl.Run()
|
||||
for {
|
||||
log.Info("serving forever")
|
||||
err = cl.Run()
|
||||
if err != nil {
|
||||
log.Debug(err)
|
||||
}
|
||||
log.Infof("server disconnected, retrying in 10 seconds")
|
||||
time.Sleep(10 * time.Second)
|
||||
}
|
||||
}
|
||||
|
||||
func relay(c *cli.Context) (err error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue