We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 780bda4 commit 8b47056Copy full SHA for 8b47056
conn.go
@@ -236,6 +236,10 @@ func (c *Conn) readTillMsg(ctx context.Context) (header, error) {
236
if h.opcode.controlOp() {
237
err = c.handleControl(ctx, h)
238
if err != nil {
239
+ // Pass through CloseErrors when receiving a close frame.
240
+ if h.opcode == opClose && CloseStatus(err) != -1 {
241
+ return header{}, err
242
+ }
243
return header{}, fmt.Errorf("failed to handle control frame %v: %w", h.opcode, err)
244
}
245
continue
0 commit comments