private void ConnectionShutdown(object sender, ShutdownEventArgs reason) { foreach (var c in SharedConnections) { if (c.Key == Endpoint + VirtualHost) { SharedConnections.Remove(c.Key); break; } } }