Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session disconnected and loginSessionLost event is not called #58

Open
diavrank opened this issue Jul 5, 2021 · 0 comments
Open

Session disconnected and loginSessionLost event is not called #58

diavrank opened this issue Jul 5, 2021 · 0 comments

Comments

@diavrank
Copy link

diavrank commented Jul 5, 2021

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.

image

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:user-presence@1.0.3

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant