good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 5fe95bbf authored by Anmol Sethi's avatar Anmol Sethi
Browse files

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.
parent 6cec2ca2
Branches
Tags
No related merge requests found
...@@ -280,6 +280,7 @@ func (c *Conn) writeFrame(ctx context.Context, fin bool, flate bool, opcode opco ...@@ -280,6 +280,7 @@ func (c *Conn) writeFrame(ctx context.Context, fin bool, flate bool, opcode opco
err = errClosed err = errClosed
case <-ctx.Done(): case <-ctx.Done():
err = ctx.Err() err = ctx.Err()
default:
} }
c.close(err) c.close(err)
err = fmt.Errorf("failed to write frame: %w", err) err = fmt.Errorf("failed to write frame: %w", err)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment