Allow client-side ping to be disabled by setting PingFreq to zero.

This commit is contained in:
Alex Bramley 2011-11-15 22:22:40 +00:00
parent 8fa5e5624e
commit 3183c9f177
1 changed files with 3 additions and 1 deletions

View File

@ -199,7 +199,9 @@ func (conn *Conn) postConnect() {
conn.sock.SetTimeout(conn.Timeout * second) conn.sock.SetTimeout(conn.Timeout * second)
go conn.send() go conn.send()
go conn.recv() go conn.recv()
if conn.PingFreq > 0 {
go conn.ping() go conn.ping()
}
go conn.runLoop() go conn.runLoop()
} }