Skip to content

Commit

Permalink
fix(session): reject Socket.io connection on session expiry
Browse files Browse the repository at this point in the history
  • Loading branch information
withSang committed Mar 3, 2024
1 parent 5d370d3 commit 4c0f312
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ const startSocketServer = (server) => {
try {
const req = socket.request;
req.session.reload((err) => {
if (err) throw err;
if (err) {
return socket.disconnect();
}

const { oid: userOid } = getLoginInfo(req);
if (!userOid) return;
Expand Down

0 comments on commit 4c0f312

Please sign in to comment.