public function onClose(ConnectionInterface $conn) { $this->clients->detach($conn); $this->console->error(sprintf('Disconnected: %d', $conn->resourceId)); }