You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When unregistering from poller the socketMap dict is not updated. When registering again the poller somtimes get out of index.
Suggested solution, clear dict entry in poller:
public func unregister(socket: Socket) throws {
let socketIndex = socketMap[socket]!
sockets.remove(at: socketIndex)
socketMap[socket] = nil
// Update indices of all other sockets in the socket map
for (socket, _) in sockets.suffix(from: socketIndex) {
let socketIndex = socketMap[socket]!
socketMap[socket] = socketIndex - 1
}
}
Edit: formatting
The text was updated successfully, but these errors were encountered:
When unregistering from poller the socketMap dict is not updated. When registering again the poller somtimes get out of index.
Suggested solution, clear dict entry in poller:
Edit: formatting
The text was updated successfully, but these errors were encountered: