Skip to content

Commit

Permalink
log incoming socket connections
Browse files Browse the repository at this point in the history
  • Loading branch information
alihm committed Jan 31, 2024
1 parent f31e79b commit 8adc44a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ClusterOperator/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -505,10 +505,11 @@ async function initServer() {

io.on('connection', async (socket) => {
const ip = utill.convertIP(socket.handshake.address);
log.debug(`connection from ${ip}`, 'red');
if (auth(ip)) {
// log.info(`validating ${ip}: ${await auth(ip)}`);
socket.on('disconnect', (reason) => {
// log.info(`disconnected from ${ip}`);
log.info(`disconnected from ${ip}`, 'red');
});
socket.on('getStatus', async (callback) => {
// log.info(`getStatus from ${ip}`);
Expand Down

0 comments on commit 8adc44a

Please sign in to comment.