summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Cheng-Han2016-07-02 16:12:48 +0800
committerWu Cheng-Han2016-07-02 16:12:48 +0800
commit858b30c20c5ce555ab023d69bad24d548cdcbc4e (patch)
treeb6b107731e42c52c37fcef16a83bbddb56efcef8
parenta7773be949a0bf74467b197810e18955a92fb2b4 (diff)
Try to solve potential memory leaks
Diffstat (limited to '')
-rw-r--r--lib/realtime.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/realtime.js b/lib/realtime.js
index 5de3c565..ad4ae215 100644
--- a/lib/realtime.js
+++ b/lib/realtime.js
@@ -330,6 +330,8 @@ var disconnectSocketQueue = [];
function finishConnection(socket, note, user) {
if (!socket || !note || !user) {
+ if (note) delete note;
+ if (user) delete user;
connectionSocketQueue.pop();
isConnectionBusy = false;
return;