Beispiel #1
0
 /**
  * Process subscribe error
  *
  * @param \Thruway\AbstractSession $session
  * @param \Thruway\Message\ErrorMessage $msg
  */
 protected function processSubscribeError(AbstractSession $session, ErrorMessage $msg)
 {
     foreach ($this->subscriptions as $key => $subscription) {
         if ($subscription["request_id"] === $msg->getErrorRequestId()) {
             // reject the promise
             $this->subscriptions[$key]['deferred']->reject($msg);
             unset($this->subscriptions[$key]);
             break;
         }
     }
 }