X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/5978b74f86b2aae0a017f114d7a137c5f1c62b96..e55ecb6c4a75d1d16b6785dbe9f75f9e22291a21:/hotline/client.go diff --git a/hotline/client.go b/hotline/client.go index a3ee425..fa204e2 100644 --- a/hotline/client.go +++ b/hotline/client.go @@ -543,11 +543,13 @@ 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") + c.Logger.Debugw("Sent keepalive ping") } }