You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am running into a situation where sometimes I am getting the the beforeConnect callback coming in just after (1s) the onConnect callback (at least as seen in the logs). It then continues to call beforeConnect over and over again every 5secs (reconnectDelay=5000). Funny thing is, the websocket is actually connected to the broker and can receive messages from the broker. I am terribly confused. Any ideas? I am on 6.1.2
this.wsclient.beforeConnect=async()=>{awaitthis.loadConnectionDetails();this.wsclient.brokerURL=this.brokerUrl();//Are we in a retry loop?if(this.connectionRetryCount==0){log.debug(`detected retry loop, will retry connection`);}this.connectionRetryCount++;};this.wsclient.onConnect=(frame)=>{log.debug("Websocket Connected",frame);if(this.connectionRetryCount>0){log.debug(`successfull websocket re-connect after ${this.connectionRetryCount} retries.`);}// Subscribing to topics and starting heartbeat after connectionthis.subscribeToTopics();this.beginHeartbeat();this.connectionRetryCount=0;this.lastServerConnectTime=newDate();this.initialized=true;};
The text was updated successfully, but these errors were encountered:
Hello, I am running into a situation where sometimes I am getting the the beforeConnect callback coming in just after (1s) the onConnect callback (at least as seen in the logs). It then continues to call beforeConnect over and over again every 5secs (reconnectDelay=5000). Funny thing is, the websocket is actually connected to the broker and can receive messages from the broker. I am terribly confused. Any ideas? I am on 6.1.2
2023-11-09 04:22:25.628-06:00 (worker1 ) [debug] WebsocketService : Websocket Connected {
command: 'CONNECTED',
headers: { 'heart-beat': '45000,45000', version: '1.2' },
_binaryBody: {},
isBinaryBody: true,
escapeHeaderValues: false,
skipContentLengthHeader: false
}
2023-11-09 04:22:25.629-06:00 (worker1 ) [debug] WebsocketService : successfull websocket re-connect after 5540 retries.
2023-11-09 04:22:25.630-06:00 (worker1 ) [debug] WebsocketService : susbcribing to device topic
2023-11-09 04:22:25.631-06:00 (worker1 ) [debug] WebsocketService : subscribed to device topic
2023-11-09 04:22:25.632-06:00 (worker1 ) [debug] WebsocketService : starting heartbeat with server
2023-11-09 04:22:28.025-06:00 (worker1 ) [debug] WebsocketService : detected retry loop, will retry connection
2023-11-09 04:22:28.093-06:00 (main ) [debug] MainIpcHandlers : IPC_EVENT_CONNECT_STATUS_CHANGE status change { online: false }
2023-11-09 04:22:28.094-06:00 (render1 ) [debug] renderPreload : connection status change { online: false }
2023-11-09 04:22:28.096-06:00 (render1 ) [info] app.tsx : connection status change in app { online: false }
The text was updated successfully, but these errors were encountered: