Merge pull request #2233 from lucas-clemente/connection-close-before-1rtt

don't send application-level errors before completion of the handshake
This commit is contained in:
Marten Seemann
2019-11-24 21:14:21 +07:00
committed by GitHub
3 changed files with 27 additions and 0 deletions

View File

@@ -16,6 +16,10 @@ type QuicError struct {
var _ net.Error = &QuicError{}
// UserCanceledError is used if the application closes the connection
// before the handshake completes.
var UserCanceledError = &QuicError{ErrorCode: 0x15a}
// Error creates a new QuicError instance
func Error(errorCode ErrorCode, errorMessage string) *QuicError {
return &QuicError{