try to reconnect after sleep

This commit is contained in:
Gokcehan committed 2018-07-26 22:11:05 +03:00
1 parent 7dbb61f295
commit 9234bcd5b8
1 file changed
+1 -1
+1 -1
View File
@@ -59,9 +59,9 @@ func readExpr() <-chan expr {
c, err := net.Dial(gSocketProt, gSocketPath)
for err != nil {
log.Printf(fmt.Sprintf("connecting server: %s", err))
c, err = net.Dial(gSocketProt, gSocketPath)
time.Sleep(duration)
duration *= 2
c, err = net.Dial(gSocketProt, gSocketPath)
}
fmt.Fprintf(c, "conn %d\n", gClientID)