File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 4646 - uses : azjezz/setup-hhvm@v1
4747 with :
4848 version : lts-3.30
49- - run : hhvm $(which composer) require phpunit/phpunit:^5 --dev # requires legacy phpunit
49+ - run : hhvm $(which composer) install
5050 - run : hhvm vendor/bin/phpunit
5151 - run : hhvm examples/13-benchmark-throughput.php
Original file line number Diff line number Diff line change @@ -231,10 +231,13 @@ public function start(LoopInterface $loop, $interval = 0.1)
231231 }
232232
233233 foreach ($ pipes as $ n => $ fd ) {
234+ // use open mode from stream meta data or fall back to pipe open mode for legacy HHVM
234235 $ meta = \stream_get_meta_data ($ fd );
235- if ($ meta ['mode ' ] === 'r+ ' ) {
236+ $ mode = $ meta ['mode ' ] === '' ? ($ this ->fds [$ n ][1 ] === 'r ' ? 'w ' : 'r ' ) : $ meta ['mode ' ];
237+
238+ if ($ mode === 'r+ ' ) {
236239 $ stream = new DuplexResourceStream ($ fd , $ loop );
237- } elseif ($ meta [ ' mode ' ] === 'w ' ) {
240+ } elseif ($ mode === 'w ' ) {
238241 $ stream = new WritableResourceStream ($ fd , $ loop );
239242 } else {
240243 $ stream = new ReadableResourceStream ($ fd , $ loop );
You can’t perform that action at this time.
0 commit comments