Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        private void OnServerSessionClosed(object sender, SessionClosedEventArgs args)
        {
            var server = (IEtpSession)sender;

            Store.ExecuteWithLock(() =>
            {
                Store.CancelAllObjectNotifications(server.SessionId);
            });
        }
Esempio n. 3
0
        private void OnServerSessionClosed(object sender, SessionClosedEventArgs args)
        {
            var server = (IEtpSession)sender;

            Store.ExecuteWithLock(() =>
            {
                foreach (var sessionId in SessionIds.Keys)
                {
                    Store.StopChannelSubscription(sessionId);
                }
            });
        }
Esempio n. 4
0
 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
         {
         }
     }));
 }
Esempio n. 5
0
        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}");
            }
        }
Esempio n. 6
0
 protected virtual void OnSessionClosed(SessionClosedEventArgs args)
 {
 }