Skip to content

Commit 858b30c

Browse files
committed
Try to solve potential memory leaks
1 parent a7773be commit 858b30c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/realtime.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@ var disconnectSocketQueue = [];
330330

331331
function finishConnection(socket, note, user) {
332332
if (!socket || !note || !user) {
333+
if (note) delete note;
334+
if (user) delete user;
333335
connectionSocketQueue.pop();
334336
isConnectionBusy = false;
335337
return;

0 commit comments

Comments
 (0)