summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/client/client.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/client/client.go b/client/client/client.go
index 0b24175..2d47ded 100644
--- a/client/client/client.go
+++ b/client/client/client.go
@@ -5,6 +5,7 @@ import (
"net"
"time"
"bufio"
+ "math/rand"
)
type MessageHandler interface {
@@ -56,7 +57,7 @@ func (c *Client) RunClient() {
continue
}
defer conn.Close()
- sleep = time.Second
+ sleep = time.Second / time.Duration(2 + rand.Int() % 4)
recv, recvErr := proto.ReadLines(bufio.NewReader(conn))
send := make(chan proto.Line, 1)