We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 46db974 + b0ce15b commit b8a38a2Copy full SHA for b8a38a2
LiveControlGateway/LifetimeManager/HubLifetimeManager.cs
@@ -155,9 +155,18 @@ public async Task RemoveDeviceConnection(IHubController hubController)
155
return;
156
}
157
158
-
159
- await hubLifetime.DisposeAsync();
160
+
+ // We need to catch this, we always want to get rid of the hub lifetime even if this failes!
+ // Otherwise we end up with a hub not being able to connect again.
161
+ try
162
+ {
163
+ await hubLifetime.DisposeAsync();
164
+ }
165
+ catch (Exception e)
166
167
+ _logger.LogError(e, "Exception thrown while disposing hub lifetime [{HubId}]", hubController.Id);
168
169
170
using (await _lifetimesLock.LockAsyncScoped())
171
{
172
if (!_lifetimes.Remove(hubController.Id))
0 commit comments