Skip to content

Commit ce80c4e

Browse files
Joosep JõelehtJoosep Jõeleht
Joosep Jõeleht
authored and
Joosep Jõeleht
committed
release(1.3.6) - Force close WD stream body on connection disconnect
1 parent 0dd26c6 commit ce80c4e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "",
44
"type": "library",
55
"license": "EUPL-1.1",
6-
"version": "1.3.5",
6+
"version": "1.3.6",
77
"require": {
88
"php": "^7.4|^8.0|^8.1",
99
"ext-curl": "*",

src/StreamRequest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ public function stream(string $method, string $path, ?array $params = [], ?array
7979
$this->connect($method, $path, $headers);
8080
$buffer = '';
8181
$body = self::$_response->getBody();
82-
8382
}
8483

8584
if (is_callable($params['isDisconnectedCallback'])) {
8685
if (call_user_func($params['isDisconnectedCallback'])) {
86+
$body->close();
8787
break;
8888
}
8989
}
@@ -114,6 +114,7 @@ public function stream(string $method, string $path, ?array $params = [], ?array
114114
@flush();
115115

116116
if (connection_aborted()) {
117+
$body->close();
117118
break;
118119
}
119120
}

0 commit comments

Comments
 (0)