public async Task Reconnect(EventsTransport transport) { eventsTransport = transport; var items = new List<Notification>(); Notification result; while (pendingMessages.TryDequeue(out result)) { items.Add(result); } try { await eventsTransport.SendManyAsync(items); foreach (var item in items) { pendingMessages.Enqueue(item); } } catch (Exception) { } }
public ConnectionState(EventsTransport eventsTransport) { this.eventsTransport = eventsTransport; }