8000 fix: avoid writing messages after close and improve handshake by FrauElster · Pull Request #476 · coder/websocket · GitHub
[go: up one dir, main page]

Skip to content

fix: avoid writing messages after close and improve handshake #476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Dec 4, 2024
Prev Previous commit
Next Next commit
group closeSent with writeFrameMu
  • Loading branch information
mafredri committed Sep 6, 2024
commit e70e06008b007314fb8637099110c7eb88fd343d
8 changes: 4 additions & 4 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ type Conn struct {
writeBuf []byte
writeHeaderBuf [8]byte
writeHeader header
closeSent bool

closeReadMu sync.Mutex
closeReadCtx context.Context
closeReadDone chan struct{}

closed chan struct{}
closeMu sync.Mutex
closing bool
closeSent bool
closed chan struct{}
closeMu sync.Mutex
closing bool

pingCounter atomic.Int64
activePingsMu sync.Mutex
Expand Down
0