Skip to content

Commit e70e060

Browse files
committed
group closeSent with writeFrameMu
1 parent 87caf58 commit e70e060

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

conn.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ type Conn struct {
6868
writeBuf []byte
6969
writeHeaderBuf [8]byte
7070
writeHeader header
71+
closeSent bool
7172

7273
closeReadMu sync.Mutex
7374
closeReadCtx context.Context
7475
closeReadDone chan struct{}
7576

76-
closed chan struct{}
77-
closeMu sync.Mutex
78-
closing bool
79-
closeSent bool
77+
closed chan struct{}
78+
closeMu sync.Mutex
79+
closing bool
8080

8181
pingCounter atomic.Int64
8282
activePingsMu sync.Mutex

0 commit comments

Comments
 (0)