Fix attached client not having token on login
This commit is contained in:
parent
833bdfa2aa
commit
2f15ab3999
@ -237,7 +237,6 @@ function initializeClient(socket, client, token, lastMessage) {
|
|||||||
socket.on("disconnect", function() {
|
socket.on("disconnect", function() {
|
||||||
client.clientDetach(socket.id);
|
client.clientDetach(socket.id);
|
||||||
});
|
});
|
||||||
client.clientAttach(socket.id, token);
|
|
||||||
|
|
||||||
socket.on(
|
socket.on(
|
||||||
"input",
|
"input",
|
||||||
@ -429,6 +428,8 @@ function initializeClient(socket, client, token, lastMessage) {
|
|||||||
socket.join(client.id);
|
socket.join(client.id);
|
||||||
|
|
||||||
const sendInitEvent = (tokenToSend) => {
|
const sendInitEvent = (tokenToSend) => {
|
||||||
|
client.clientAttach(socket.id, token);
|
||||||
|
|
||||||
let networks = client.networks;
|
let networks = client.networks;
|
||||||
|
|
||||||
if (lastMessage > -1) {
|
if (lastMessage > -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user