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
So I have a client that passes auth and other info via the withPayload: parameter of SocketIOClient.connect. When I get a .reconnectAttempt client event, I want to update this payload to a new value. I see SocketIOClient stores this payload as connectPayload and passes it again, but the property is internal.
Calling SocketIOClient.connect within the event handler seems possible but like it has side effects. Same with SocketIOClient.joinNamespace. As I'm already reconnecting, I worry that calling one of these can cause a race condition in SocketManager._tryReconnect since they will call SocketManager.connect() internally before it is called in SocketManager._tryReconnect. Maybe unfounded, but nonetheless shouldn't there be a public way to update this value?
I think I can get around it by subclassing but that seems heavy handed...
The text was updated successfully, but these errors were encountered:
So I have a client that passes auth and other info via the
withPayload:
parameter ofSocketIOClient.connect
. When I get a.reconnectAttempt
client event, I want to update this payload to a new value. I seeSocketIOClient
stores this payload asconnectPayload
and passes it again, but the property is internal.Calling
SocketIOClient.connect
within the event handler seems possible but like it has side effects. Same withSocketIOClient.joinNamespace
. As I'm already reconnecting, I worry that calling one of these can cause a race condition inSocketManager._tryReconnect
since they will callSocketManager.connect()
internally before it is called inSocketManager._tryReconnect
. Maybe unfounded, but nonetheless shouldn't there be a public way to update this value?I think I can get around it by subclassing but that seems heavy handed...
The text was updated successfully, but these errors were encountered: