Skip to content

Commit

Permalink
#58 sometimes "removeSocketMapping" gets invoked with a socketId that…
Browse files Browse the repository at this point in the history
… is not present in the registry.. not sure why
  • Loading branch information
[email protected] authored and [email protected] committed Jun 25, 2020
1 parent a6edc3e commit 656e3b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/src/socketRegistry.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export default function socketRegistryFactory() {
}

function removeSocketMapping(socketId, userId, roomId) {
if (!registry[socketId]) {
return;
}

LOGGER.debug(`Removing mapping: socket ${socketId} -> [user ${userId}, room ${roomId}]`);

if (registry[socketId].userId !== userId) {
Expand Down

0 comments on commit 656e3b1

Please sign in to comment.