use the correct error code for handshake timeouts

This commit is contained in:
Marten Seemann
2017-06-01 20:02:57 +02:00
parent 9040fd25e7
commit 13a25a5ba5
2 changed files with 9 additions and 5 deletions

View File

@@ -328,7 +328,7 @@ runLoop:
s.close(qerr.Error(qerr.NetworkIdleTimeout, "No recent network activity."))
}
if !s.handshakeComplete && now.Sub(s.sessionCreationTime) >= s.config.HandshakeTimeout {
s.close(qerr.Error(qerr.NetworkIdleTimeout, "Crypto handshake did not complete in time."))
s.close(qerr.Error(qerr.HandshakeTimeout, "Crypto handshake did not complete in time."))
}
s.garbageCollectStreams()
}