simpleddp
simpleddp copied to clipboard
Session disconnected and loginSessionLost event is not called
Hello @Gregivy , it happens that I have a monitoring application and I am getting a weird behavior, since devices (users) are disconnected after the 3rd or 5th day. In some cases, they're reconnected automatically (this is good) but in other cases they remain offline.
I am using socialize:user-presence package to monitor sessions of the devices. This code let me know if a device is connected or disconnected:
UserPresence.onSessionConnected(function(connection, userId) {
console.log('user-connected: ', userId, ' with IP address: ', connection.clientAddress, 'and connection id: ', connection.id);
});
UserPresence.onSessionDisconnected(function(connection, userId) {
console.log('user-disconnected: ', userId, ' with IP address: ', connection.clientAddress, 'and connection id: ', connection.id);
});
Notes:
Server:
- Meteor 2.0
- MongoDB 4.2.5
- socialize:[email protected]
Client:
- Simple DDP Client
- Asus Tinker Boards (SBC) with Debian OS
- Node 12/14
- It is worth mentioning that these devices at the moment do not make calls to endpoints (methods and publications), only the time in which they remain with online status is being measured.
I have tested that bahavior on a Windows machine (as a client) and I got the same issue. When the PC is not used for a while (until it gets suspended), I receive in the server a log of disconnected client while in the client doesn't update the connectivity status.
Front-end of web admin is using Vue since they are real users who operate the system.