mirror of
https://github.com/kataras/iris.git
synced 2026-01-24 20:35:59 +00:00
Nothing special here
On websocket: https://github.com/kataras/iris/issues/340#issuecomment-237612680
This commit is contained in:
@@ -201,7 +201,9 @@ func (s *websocketServer) serve() {
|
||||
case join := <-s.join:
|
||||
s.joinRoom(join.roomName, join.websocketConnectionID)
|
||||
case leave := <-s.leave:
|
||||
s.leaveRoom(leave.roomName, leave.websocketConnectionID)
|
||||
if _, found := s.websocketConnections[leave.websocketConnectionID]; found {
|
||||
s.leaveRoom(leave.roomName, leave.websocketConnectionID)
|
||||
}
|
||||
case msg := <-s.messages: // message received from the websocketConnection
|
||||
if msg.to != All && msg.to != NotMe && s.rooms[msg.to] != nil {
|
||||
// it suppose to send the message to a room
|
||||
|
||||
Reference in New Issue
Block a user