-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Hi,
how to reject a client connection properly? I have something like this:
SocketIoNamespace ns = mSocketIoServer.namespace("/");
ns.on("connection", args -> {
SocketIoSocket socket = (SocketIoSocket) args[0];
//verify JWT token
if (isTokenInvalid()) {
socket.disconnect(true);
}
})
socket.disconnect(true) doesn't interrupt the whole connection process, so I am not sure if it's correct solution (e.g. disconnect() method clears mSockets Map inside SocketIoClient, but right after that, method onConnect() put something to that map and the rest of the connection process takes place).
Thanks for answers.
Metadata
Metadata
Assignees
Labels
No labels