public function gracefulShutdown() { if ($this->finished) { return !$this->writing; } $this->logoff(); $this->finish(); return false; }