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
this doesn't happen always, but it happens quite often and out of the 7 services I am connecting to, there is one, that causes this most often, but it's not limited to this one only, it can be related to the order in which they are started
when InitializeWebsocketConnection Task is completed, WebsocketConnectionState is still Disconnected, so I am waiting for it to change to Connected, but it never changes
Reconnecting then results in immedate connection with the correct state
foreach (var client in _graphQlClients)
{
var connectionTask = client.Value.InitializeWebsocketConnection();
connectionTasks.Add(client.Key, (connectionTask, client.Value));
stateTasks.Add(client.Key, client.Value.WebsocketConnectionState.Where(x => x == GraphQLWebsocketConnectionState.Connected).Take(1).ToTask());
}
var delayTask = Task.Delay(TimeSpan.FromSeconds(_appSettings.DcConnectionTimeoutSeconds));
var sw = Stopwatch.StartNew();
await Task.WhenAny(Task.WhenAll(connectionTasks.Values.Select(x => x.Task).Concat(stateTasks.Values)), delayTask);
Is there some more reliable source of truth that would tell me if the connection was established?
it is possible to ignore the fact that the state is Disconnected and use the connection, it works, so the problem is just with the state not being updated
The text was updated successfully, but these errors were encountered:
this doesn't happen always, but it happens quite often and out of the 7 services I am connecting to, there is one, that causes this most often, but it's not limited to this one only, it can be related to the order in which they are started
when InitializeWebsocketConnection Task is completed, WebsocketConnectionState is still Disconnected, so I am waiting for it to change to Connected, but it never changes
Reconnecting then results in immedate connection with the correct state
Is there some more reliable source of truth that would tell me if the connection was established?
it is possible to ignore the fact that the state is Disconnected and use the connection, it works, so the problem is just with the state not being updated
The text was updated successfully, but these errors were encountered: