mirror of https://github.com/status-im/codimd.git
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
|
@ -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 New Issue