diff options
| -rw-r--r-- | hotline/client.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hotline/client.go b/hotline/client.go index a3ee425..12e3167 100644 --- a/hotline/client.go +++ b/hotline/client.go @@ -543,9 +543,11 @@ func (c *Client) Connect(address, login, passwd string) (err error) { return nil } +const keepaliveInterval = 300 * time.Second + func (c *Client) keepalive() error { for { - time.Sleep(300 * time.Second) + time.Sleep(keepaliveInterval) _ = c.Send(*NewTransaction(TranKeepAlive, nil)) c.Logger.Infow("Sent keepalive ping") } |