Skip to content

Commit 5fe95bb

Browse files
committed
write.go: Fix potential writeFrame deadlock
Closes #405 You should always be reading from the connection with CloseRead so this shouldn't have affected anyone using the library correctly.
1 parent 6cec2ca commit 5fe95bb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: write.go

+1
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ func (c *Conn) writeFrame(ctx context.Context, fin bool, flate bool, opcode opco
280280
err = errClosed
281281
case <-ctx.Done():
282282
err = ctx.Err()
283+
default:
283284
}
284285
c.close(err)
285286
err = fmt.Errorf("failed to write frame: %w", err)

0 commit comments

Comments
 (0)