2
0

fix keepalive

simple patch for keepalive on the same host
This commit is contained in:
Nikolay Pavlovich
2022-07-07 17:25:03 +03:00
committed by GitHub
parent 4baede84bc
commit b75eaf3c16
+2 -1
View File
@@ -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
}