diff --git a/index.js b/index.js index 53e2b0e..e1a6e8c 100644 --- a/index.js +++ b/index.js @@ -490,7 +490,7 @@ wss.on('connection', (ws, request) => { const clientIp = request.headers['x-forwarded-for'] || request.connection.remoteAddress; currentUsers++; dataHandler.showOnlineUsers(currentUsers); - if(currentUsers > 0 && serverConfig.autoShutdown === true) { + if(currentUsers === 1 && serverConfig.autoShutdown === true) { connectToXdrd(); }