Start WebSocket before registering its presence

This commit is contained in:
Fedor Indutnyy authored and Jon Chambers committed 2021-08-27 16:41:07 -04:00
1 parent d1735c7e57
commit 703405b874
1 file changed
+1 -1
@@ -91,9 +91,9 @@ public class AuthenticatedConnectListener implements WebSocketConnectListener {
});
try {
connection.start();
clientPresenceManager.setPresent(auth.getAccount().getUuid(), device.getId(), connection);
messagesManager.addMessageAvailabilityListener(auth.getAccount().getUuid(), device.getId(), connection);
connection.start();
} catch (final Exception e) {
log.warn("Failed to initialize websocket", e);
context.getClient().close(1011, "Unexpected error initializing connection");