1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-06 03:53:50 +08:00
This commit is contained in:
wdvxdr 2021-03-19 22:17:31 +08:00
parent 3301077c46
commit 5d61a254e6
No known key found for this signature in database
GPG Key ID: 55FF1414A69CEBA6

View File

@ -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)
}