Skip to content
This repository was archived by the owner on May 24, 2023. It is now read-only.

Commit 8fd40f0

Browse files
committed
Update websocket.go
1 parent 4f6a753 commit 8fd40f0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

websocket.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,15 @@ const (
242242
)
243243

244244
var (
245+
// ErrBadHandshake is returned when the server response to opening handshake is
246+
// invalid.
245247
ErrBadHandshake = errors.New("websocket: bad handshake")
246-
ErrCloseSent = errors.New("websocket: close sent")
247-
ErrReadLimit = errors.New("websocket: read limit exceeded")
248+
// ErrCloseSent is returned when the application writes a message to the
249+
// connection after sending a close message.
250+
ErrCloseSent = errors.New("websocket: close sent")
251+
// ErrReadLimit is returned when reading a message that is larger than the
252+
// read limit set for the connection.
253+
ErrReadLimit = errors.New("websocket: read limit exceeded")
248254
)
249255

250256
// FormatCloseMessage formats closeCode and text as a WebSocket close message.

0 commit comments

Comments
 (0)