public function close() { if ($this->closed) { return; } $this->loop->cancelTimer($this->timer); unset($this->queue); $this->closed = true; }