fixed
This commit is contained in:
@@ -332,6 +332,10 @@ func (rc *RecConn) keepAlive() {
|
|||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
if (!rc.IsConnected()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
rc.writeControlPingMessage()
|
rc.writeControlPingMessage()
|
||||||
<-ticker.C
|
<-ticker.C
|
||||||
if time.Now().Sub(keepAliveResponse.getLastResponse()) > rc.getKeepAliveTimeout() {
|
if time.Now().Sub(keepAliveResponse.getLastResponse()) > rc.getKeepAliveTimeout() {
|
||||||
|
|||||||
Reference in New Issue
Block a user