Пример #1
0
        private void FinishRequest(TimeSpan?result, ErrorInfo error)
        {
            if (_finished == false)
            {
                lock (_syncLock)
                {
                    if (_finished == false)
                    {
                        _finished = true;

                        _manager.MessageReceived -= OnMessageReceived;
                        _manager.Connection.InternalStateChanged -= OnInternalStateChanged;
                        _timer.Abort();

                        _callback?.Invoke(result, error);

                        _callback = null;
                        _manager  = null;
                        _timer    = null;
                    }
                }
            }
        }
 private void TransitionState(ConnectionState newState)
 {
     this.context.SetState(newState);
     _timer.Abort();
 }
Пример #3
0
 private void TransitionState(RealtimeCommand command)
 {
     _timer.Abort();
     Context.ExecuteCommand(command);
 }
Пример #4
0
 public override void Close()
 {
     _timer.Abort();
     Context.ExecuteCommand(SetClosedStateCommand.Create().TriggeredBy("SuspendedState.Close()"));
 }
Пример #5
0
 public override void AbortTimer()
 {
     _timer.Abort();
 }
 public override void Close()
 {
     _timer.Abort();
     Context.SetState(new ConnectionClosedState(Context, Logger));
 }