void IRpcPeer.OnSessionClosed(SessionClosedEventArgs args) { try { OnSessionClosed(args); } catch (Exception e) { logger.Error($"Unhandled exception on {this.GetType().Name}.{nameof(OnSessionClosed)}: {e}"); } try { OnSessionClosedEvent?.Invoke(args); } catch (Exception e) { logger.Error($"Unhandled exception on {this.GetType().Name}.{nameof(OnSessionClosedEvent)}: {e}"); } ChangeStatus(RpcClientStatus.Disconnected); reconnectTimerStartFrom = DateTime.UtcNow; this.Session = null; }
private void OnServerSessionClosed(object sender, SessionClosedEventArgs args) { var server = (IEtpSession)sender; Store.ExecuteWithLock(() => { Store.CancelAllObjectNotifications(server.SessionId); }); }
private void OnServerSessionClosed(object sender, SessionClosedEventArgs args) { var server = (IEtpSession)sender; Store.ExecuteWithLock(() => { foreach (var sessionId in SessionIds.Keys) { Store.StopChannelSubscription(sessionId); } }); }
private async void OnSessionClosed(RTMPPublishSession sender, SessionClosedEventArgs args) { await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, new Windows.UI.Core.DispatchedHandler(() => { try { if (_deviceManager.History != null) { _deviceManager.AddIngestURLToHistory(_deviceManager.PublishProfiles[0].EndpointUri, "AZURE", args.LastVideoTimestamp, args.LastAudioTimestamp); } } catch { } })); }
void IRpcPeer.OnSessionClosed(SessionClosedEventArgs args) { try { OnSessionClosed(args); } catch (Exception e) { logger.Error($"Unhandled exception on {this.GetType().Name}.{nameof(OnSessionClosed)}: {e}"); } try { OnSessionClosedEvent?.Invoke(args); } catch (Exception e) { logger.Error($"Unhandled exception on {this.GetType().Name}.{nameof(OnSessionClosedEvent)}: {e}"); } }
protected virtual void OnSessionClosed(SessionClosedEventArgs args) { }