public function handleDisconnect($socket) { try { $this->component->handleDisconnect($socket->conn); } catch (Error $ex) { $this->handleError($socket, $ex); } catch (Exception $ex) { $this->handleError($socket, $ex); } unset($socket->conn); }