diff options
Diffstat (limited to 'lib/sockets.js')
| -rw-r--r-- | lib/sockets.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sockets.js b/lib/sockets.js index ee16b962..33d1d208 100644 --- a/lib/sockets.js +++ b/lib/sockets.js @@ -90,8 +90,7 @@ app.register(async function(app) { case "login": let token = data; - - if (lastSeen[token] > subtractSeconds(5)) ws.close(); + if (lastSeen[token] > subtractSeconds(5)) return; lastSeen[token] = new Date(); try { @@ -136,6 +135,7 @@ app.register(async function(app) { }); let accounts = await user.getAccounts(); + let keys = await user.getKeys(); user = user.get({ plain: true }); user.accounts = accounts; @@ -194,7 +194,7 @@ app.register(async function(app) { }); ws.on("close", function(code, reason) { - // if (reason) console.log("closing socket", reason); + // if (reason) console.log("closing socket", reason.toString(), id); try { const username = names[id]; if (store.sockets[username] && store.sockets[username][id]) { |
