onClose() public method

Handle on close client session
public onClose ( )
Exemplo n.º 1
0
 /**
  * Handle close session
  *
  * @param mixed $reason
  */
 public function onClose($reason)
 {
     if (isset($this->session)) {
         $this->onSessionEnd($this->session);
         $this->session->onClose();
         $this->session = null;
         $this->emit('close', [$reason]);
     }
     $this->roles = [];
     $this->callee = null;
     $this->caller = null;
     $this->subscriber = null;
     $this->publisher = null;
     $this->retryConnection();
 }