File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -360,6 +360,9 @@ public function reset()
360
360
curl_setopt ($ ch , \CURLOPT_VERBOSE , false );
361
361
}
362
362
}
363
+
364
+ curl_multi_close ($ this ->multi ->handle );
365
+ $ this ->multi ->handle = curl_multi_init ();
363
366
}
364
367
365
368
/**
Original file line number Diff line number Diff line change @@ -136,6 +136,18 @@ public function testTimeoutIsNotAFatalError()
136
136
parent ::testTimeoutIsNotAFatalError ();
137
137
}
138
138
139
+ public function testHandleIsReinitOnReset ()
140
+ {
141
+ $ httpClient = $ this ->getHttpClient (__FUNCTION__ );
142
+
143
+ $ r = new \ReflectionProperty ($ httpClient , 'multi ' );
144
+ $ r ->setAccessible (true );
145
+ $ clientState = $ r ->getValue ($ httpClient );
146
+ $ initialHandleId = (int ) $ clientState ->handle ;
147
+ $ httpClient ->reset ();
148
+ self ::assertNotSame ($ initialHandleId , (int ) $ clientState ->handle );
149
+ }
150
+
139
151
private function getVulcainClient (): CurlHttpClient
140
152
{
141
153
if (\PHP_VERSION_ID >= 70300 && \PHP_VERSION_ID < 70304 ) {
You can’t perform that action at this time.
0 commit comments