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; }
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}"); } }