Skip to content
Snippets Groups Projects
Commit d6132e97 authored by Tiago Jacobs's avatar Tiago Jacobs
Browse files

Postpone websocket close for a failed authToken

parent 65e6f150
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,11 @@ export default function handleValidateAuthToken({ body }, meetingId) {
const {methodInvocationObject} = pendingAuth;
const connectionId = methodInvocationObject.connection.id;
methodInvocationObject.connection.close();
// Schedule socket disconnection for this user, giving some time for client receiving the reason of disconnection
setTimeout(()=>{
methodInvocationObject.connection.close();
}, 2000);
Logger.info(`Closed connection ${connectionId} due to invalid auth token.`);
} catch (e) {
Logger.error(`Error closing socket for meetingId '${meetingId}', userId '${userId}', authToken ${authToken}`);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment