Try to solve realtime connection get stock when lots of client try to connect at same moment
This commit is contained in:
parent
6fddab1bfc
commit
614a97376d
1 changed files with 5 additions and 1 deletions
|
@ -329,7 +329,11 @@ var isDisconnectBusy = false;
|
|||
var disconnectSocketQueue = [];
|
||||
|
||||
function finishConnection(socket, note, user) {
|
||||
if (!socket || !note || !user) return;
|
||||
if (!socket || !note || !user) {
|
||||
connectionSocketQueue.pop();
|
||||
isConnectionBusy = false;
|
||||
return;
|
||||
}
|
||||
//check view permission
|
||||
if (note.permission == 'private') {
|
||||
if (socket.request.user && socket.request.user.logged_in && socket.request.user.id == note.owner) {
|
||||
|
|
Loading…
Reference in a new issue