Merge pull request #2494 from lucas-clemente/remove-duplicate-timeout-check

remove duplicate check for handshake and idle timeout in session
This commit is contained in:
Marten Seemann
2020-04-16 09:28:44 +07:00
committed by GitHub

View File

@@ -585,15 +585,6 @@ runLoop:
continue
}
if !s.handshakeComplete && now.Sub(s.sessionCreationTime) >= s.config.HandshakeTimeout {
s.destroyImpl(qerr.NewTimeoutError("Handshake did not complete in time"))
continue
}
if s.handshakeComplete && now.Sub(s.idleTimeoutStartTime()) >= s.idleTimeout {
s.destroyImpl(qerr.NewTimeoutError("No recent network activity"))
continue
}
if err := s.sendPackets(); err != nil {
s.closeLocal(err)
}