Show socket id in log if no ip available
This commit is contained in:
parent
5d5b0928e0
commit
300bfe4371
@ -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'];
|
||||
|
Loading…
Reference in New Issue
Block a user