Prevent unnesessary log

pull/238/head
Shelikhoo 2016-08-15 12:23:15 +08:00
parent d250013c99
commit 2bf9edfe7d
No known key found for this signature in database
GPG Key ID: 7791BDB0709ABD21
1 changed files with 3 additions and 1 deletions

View File

@ -195,7 +195,9 @@ func (ws *wsconn) pingPong() {
case <-pongRcv:
break
case <-tick.C:
log.Debug("WS:Closing as ping is not responded~" + ws.wsc.UnderlyingConn().LocalAddr().String() + "-" + ws.wsc.UnderlyingConn().RemoteAddr().String())
if !ws.connClosing {
log.Debug("WS:Closing as ping is not responded~" + ws.wsc.UnderlyingConn().LocalAddr().String() + "-" + ws.wsc.UnderlyingConn().RemoteAddr().String())
}
ws.Close()
}
<-tick.C