From 300bfe437178a571d89c2d250e1f1e48698939f5 Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Wed, 15 Aug 2018 23:27:37 +0000 Subject: [PATCH] Show socket id in log if no ip available --- config/sockets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/sockets.js b/config/sockets.js index 2c794d9..8cdc043 100755 --- a/config/sockets.js +++ b/config/sockets.js @@ -27,7 +27,7 @@ module.exports = { init: (io) => { io.on('connection', (socket) => { - debug(`${socket.ip} connected.`) + debug(`${socket.ip||socket.id} connected.`) // Set a few variables socket.ip = socket.client.request.headers['x-real-ip'];