diff --git a/client/connection.go b/client/connection.go index a2e3bb3..b161d57 100644 --- a/client/connection.go +++ b/client/connection.go @@ -199,7 +199,9 @@ func (conn *Conn) postConnect() { conn.sock.SetTimeout(conn.Timeout * second) go conn.send() go conn.recv() - go conn.ping() + if conn.PingFreq > 0 { + go conn.ping() + } go conn.runLoop() }