Skip to content

Commit e1ade9a

Browse files
committed
[http client] clear buffer once it's not needed anymore
1 parent f0e536c commit e1ade9a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Client/Request.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ public function handleData($data)
128128
if (false !== strpos($this->buffer, "\r\n\r\n")) {
129129
list($response, $bodyChunk) = $this->parseResponse($this->buffer);
130130

131+
$this->buffer = null;
132+
131133
$this->stream->removeListener('drain', array($this, 'handleDrain'));
132134
$this->stream->removeListener('data', array($this, 'handleData'));
133135
$this->stream->removeListener('end', array($this, 'handleEnd'));

0 commit comments

Comments
 (0)