Skip to content

Session disconnected and loginSessionLost event is not called #58

@diavrank

Description

@diavrank

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions