diff options
| author | Adam Soltys <[email protected]> | 2020-05-15 16:19:31 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-05-15 16:19:31 -0700 |
| commit | 2de555a54fb1c302c5b7e8dd8f31cacd082f43b6 (patch) | |
| tree | b789597d6935aff177beea777ad6da541d08a9da /lib/sockets.js | |
| parent | 0414346c73fca91f20946c6b8a4416b192ffe5e9 (diff) | |
| download | coinos-server-2de555a54fb1c302c5b7e8dd8f31cacd082f43b6.tar.gz coinos-server-2de555a54fb1c302c5b7e8dd8f31cacd082f43b6.zip | |
check for null string
Diffstat (limited to 'lib/sockets.js')
| -rw-r--r-- | lib/sockets.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sockets.js b/lib/sockets.js index c630c1fd..c27f997a 100644 --- a/lib/sockets.js +++ b/lib/sockets.js @@ -39,7 +39,8 @@ wss.on("connection", function (ws) { const id = uuidv4(); ws.on("message", async (token) => { - if (!token) return; + l.info(token); + if (!token || token === "null") return; try { const username = jwt.decode(token).username; if (!sockets[username]) sockets[username] = {}; |
