Example #1
0
File: Call.php Project: m6w6/seekat
 /**
  * Cancellation callback
  * @param callable $resolve
  * @param callable $reject
  */
 private function cancel(callable $resolve, callable $reject)
 {
     /* did we finish in the meantime? */
     if ($this->response) {
         $this->complete($resolve, $reject);
     } else {
         $this->client->detach($this);
         $this->client->dequeue($this->request);
         $reject("Cancelled");
     }
 }