We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61bf248 commit 1e683d3Copy full SHA for 1e683d3
1 file changed
src/Request.php
@@ -136,8 +136,6 @@ public function handleData($data)
136
list($response, $bodyChunk) = $this->parseResponse($this->buffer);
137
} catch (\InvalidArgumentException $exception) {
138
$this->emit('error', [$exception, $this]);
139
-
140
- return;
141
}
142
143
$this->buffer = null;
@@ -147,6 +145,10 @@ public function handleData($data)
147
145
$this->stream->removeListener('end', array($this, 'handleEnd'));
148
146
$this->stream->removeListener('error', array($this, 'handleError'));
149
+ if (!isset($response)) {
+ return;
150
+ }
151
+
152
$this->response = $response;
153
154
$response->on('end', function () {
0 commit comments