don't send application-level errors before completion of the handshake

This commit is contained in:
Marten Seemann
2019-11-23 11:30:20 +07:00
parent 92b898e811
commit d77e400f00
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{