Browse Source

Bug when using leaveRoom

When using leaveRoom, the complete clientRooms Instance get removed, which causes the SocketIOClient getAllRooms Method to returns a empty list, even when your client is still in some rooms. This doesn't harm SocketIOServer getRoomOperations Method (which still returns all clients from the given room), but harms for example the onDisconnectListener, when you override the onDisconnect Method, which than returns a empty list for the joinedRooms.
master
CrazyIvan007 9 years ago
committed by GitHub
parent
commit
4857f89b76
  1. 2
      src/main/java/com/corundumstudio/socketio/namespace/Namespace.java

2
src/main/java/com/corundumstudio/socketio/namespace/Namespace.java

@ -301,7 +301,7 @@ public class Namespace implements SocketIONamespace {
public void leave(String room, UUID sessionId) {
leave(roomClients, room, sessionId);
clientRooms.remove(sessionId);
leave(clientRooms, sessionId, room);
}
public Set<String> getRooms(SocketIOClient client) {

Loading…
Cancel
Save