React\HttpClient\ChunkedStreamDecoder::handleEnd PHP Method

handleEnd() public method

public handleEnd ( )
    public function handleEnd()
    {
        $this->handleData('');
        if ($this->closed) {
            return;
        }
        if ($this->buffer === '' && $this->reachedEnd) {
            $this->emit('end');
            $this->close();
            return;
        }
        $this->emit('error', [new Exception('Stream ended with incomplete control code')]);
        $this->close();
    }