public function close() { if (true === $this->closed) { return; } parent::close(); $this->deferred->resolve($this->buffer); }