From 1dd02cc22cce28628b2e34ed14e099b7be52927c Mon Sep 17 00:00:00 2001 From: Freeyorp Date: Wed, 15 May 2013 07:08:51 +1200 Subject: Kill sockets without a valid session --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 0276a68..65d8d93 100644 --- a/index.js +++ b/index.js @@ -50,6 +50,9 @@ var channels = {}; var logServerAction = entityLogger(0); sessionSockets.on('connection', function (err, socket, session) { + if (!session) { + socket.disconnect(); + } /* * Don't do anything until they send a login message. * Later versions might also check a protocol version here. -- cgit v1.2.3-60-g2f50