File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,6 @@ matrix:
51
51
- php -r "file_put_contents(php_ini_loaded_file(),'extension=event'.PHP_EOL,FILE_APPEND);"
52
52
install :
53
53
- composer install
54
- script :
55
- - vendor/bin/phpunit --coverage-text || ([[ $? = 139 ]] && echo && echo "Ignoring SEGFAULT.." >&2) # ignore unrelated SEGFAULT when all tests pass
56
54
allow_failures :
57
55
- php : hhvm
58
56
- os : windows
Original file line number Diff line number Diff line change @@ -59,6 +59,17 @@ public function __construct()
59
59
$ this ->createStreamCallback ();
60
60
}
61
61
62
+ public function __destruct ()
63
+ {
64
+ // explicitly clear all references to Event objects to prevent SEGFAULTs on Windows
65
+ foreach ($ this ->timerEvents as $ timer ) {
66
+ $ this ->timerEvents ->detach ($ timer );
67
+ }
68
+
69
+ $ this ->readEvents = array ();
70
+ $ this ->writeEvents = array ();
71
+ }
72
+
62
73
public function addReadStream ($ stream , $ listener )
63
74
{
64
75
$ key = (int ) $ stream ;
You can’t perform that action at this time.
0 commit comments