mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 19:43:49 +08:00
fix lock
This commit is contained in:
parent
3301077c46
commit
5d61a254e6
@ -314,7 +314,9 @@ func (s *webSocketServer) any(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
log.Infof("接受 WebSocket 连接: %v (/)", r.RemoteAddr)
|
||||
conn := &webSocketConn{Conn: c, apiCaller: apiCaller{s.bot}}
|
||||
s.eventConnMutex.Lock()
|
||||
s.eventConn = append(s.eventConn, conn)
|
||||
s.eventConnMutex.Unlock()
|
||||
s.listenAPI(conn)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user