File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,9 @@ private function lockBlocking(): void
97
97
*/
98
98
private function lockPcntl (): void
99
99
{
100
- $ timebox = new PcntlTimeout ($ this ->timeout );
100
+ $ timeoutInt = (int ) ceil ($ this ->timeout );
101
+
102
+ $ timebox = new PcntlTimeout ($ timeoutInt );
101
103
102
104
try {
103
105
$ timebox ->timeBoxed (
@@ -106,7 +108,7 @@ function (): void {
106
108
}
107
109
);
108
110
} catch (DeadlineException $ e ) {
109
- throw TimeoutException::create ($ this -> timeout );
111
+ throw TimeoutException::create ($ timeoutInt );
110
112
}
111
113
}
112
114
Original file line number Diff line number Diff line change 14
14
*
15
15
* This class requires the pcntl module and supports the cli sapi only.
16
16
*
17
+ * Only integer timeout is supported - https://github.com/php/php-src/issues/11828.
18
+ *
17
19
* @internal
18
20
*/
19
21
final class PcntlTimeout
You can’t perform that action at this time.
0 commit comments