mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-26 20:14:47 +01:00
Merge pull request #26 from Ezaki113/master
Fix broken test and add missing test
This commit is contained in:
commit
3815766985
7
tests/002-uv_loop_delete_segfault.phpt
Normal file
7
tests/002-uv_loop_delete_segfault.phpt
Normal file
@ -0,0 +1,7 @@
|
||||
--TEST--
|
||||
Segmentation fault after uv_loop_delete
|
||||
--FILE--
|
||||
<?php
|
||||
$loop = uv_loop_new();
|
||||
uv_loop_delete($loop);
|
||||
--EXPECTF--
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user