public function onFailure() { if ($this->onConnected) { $this->onConnected->executeAll($this); $this->onConnected = null; } }