fix keepalive
simple patch for keepalive on the same host
This commit is contained in:
committed by
GitHub
parent
4baede84bc
commit
b75eaf3c16
@@ -409,7 +409,8 @@ func (rc *RecConn) keepAlive() {
|
||||
}
|
||||
|
||||
<-ticker.C
|
||||
if time.Since(keepAliveResponse.getLastResponse()) > rc.getKeepAliveTimeout() {
|
||||
timeoutOffset := time.Millisecond * 10
|
||||
if time.Since(keepAliveResponse.getLastResponse()) > rc.getKeepAliveTimeout()+timeoutOffset {
|
||||
rc.CloseAndReconnect()
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user