We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 075e365 + 40efc8c commit 56722afCopy full SHA for 56722af
1 file changed
pkg/wsserver/wsserver.go
@@ -127,7 +127,13 @@ func (s *webSocketServer) connectionClosed(c *webSocketConnection) {
127
}
128
129
func (s *webSocketServer) Close() {
130
+ s.mux.Lock()
131
+ conns := make([]*webSocketConnection, 0, len(s.connections))
132
for _, c := range s.connections {
133
+ conns = append(conns, c)
134
+ }
135
+ s.mux.Unlock()
136
+ for _, c := range conns {
137
c.close()
138
139
0 commit comments