Fix race condition failing to properly log in user
This commit is contained in:
parent
60ba970c34
commit
54226c0ca5
|
|
@ -492,6 +492,7 @@ Channel.prototype.preJoin = function (user, password) {
|
||||||
}
|
}
|
||||||
|
|
||||||
user.socket.emit("rank", user.rank);
|
user.socket.emit("rank", user.rank);
|
||||||
|
user.hasChannelRank = true;
|
||||||
user.emit("channelRank", user.rank);
|
user.emit("channelRank", user.rank);
|
||||||
|
|
||||||
if (self.permissions.seeplaylist > -1) {
|
if (self.permissions.seeplaylist > -1) {
|
||||||
|
|
|
||||||
|
|
@ -95,10 +95,6 @@ function User(socket) {
|
||||||
self.initAdminCallbacks();
|
self.initAdminCallbacks();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
self.once("channelRank", function () {
|
|
||||||
self.hasChannelRank = true;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue