cmd/route-httpagent: attempt to be a bit more durable
This commit is contained in:
parent
eacd9781f7
commit
3ee292925d
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"crypto/tls"
|
||||
"flag"
|
||||
"time"
|
||||
|
||||
"git.xeserv.us/xena/route/internal/tun2"
|
||||
"github.com/Xe/ln"
|
||||
|
@ -32,8 +33,13 @@ func main() {
|
|||
}
|
||||
|
||||
client, _ := tun2.NewClient(cfg)
|
||||
|
||||
for {
|
||||
err := client.Connect()
|
||||
if err != nil {
|
||||
ln.FatalErr(context.Background(), err, ln.Action("http agent is now running"))
|
||||
ln.Error(context.Background(), err, ln.Action("client connection failed"))
|
||||
}
|
||||
|
||||
time.Sleep(2 * time.Second)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue