Merge pull request #26 from Ezaki113/master

Fix broken test and add missing test
This commit is contained in:
Bob Weinand 2017-02-19 12:25:44 +01:00 committed by GitHub
commit 3815766985
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,7 @@
--TEST--
Segmentation fault after uv_loop_delete
--FILE--
<?php
$loop = uv_loop_new();
uv_loop_delete($loop);
--EXPECTF--

View File

@ -11,6 +11,10 @@ uv_listen($a, 8192, function($stream) {
$pipe = uv_pipe_init(uv_default_loop(), 0);
uv_accept($stream, $pipe);
uv_read_start($pipe,function($pipe, $nread, $buffer) use ($stream) {
if ($nread === \UV::EOF) {
return;
}
echo $buffer;
uv_read_stop($pipe);
uv_close($stream, function() {