File tree 4 files changed +23
-6
lines changed
4 files changed +23
-6
lines changed Original file line number Diff line number Diff line change 20
20
"require" : {
21
21
"php" : " >=8.0" ,
22
22
"amphp/amp" : " v2.6.*" ,
23
- "amphp/socket" : " v1.1 .*" ,
23
+ "amphp/socket" : " v1.2 .*" ,
24
24
"phpinnacle/buffer" : " v1.2.*"
25
25
},
26
26
"require-dev" : {
27
27
"phpunit/phpunit" : " v9.5.*" ,
28
- "vimeo/psalm" : " v4.13 .*" ,
29
- "phpstan/phpstan" : " v1.2 .*"
28
+ "vimeo/psalm" : " v4.18 .*" ,
29
+ "phpstan/phpstan" : " v1.4 .*"
30
30
},
31
31
"prefer-stable" : true ,
32
32
"autoload" : {
52
52
},
53
53
"config" : {
54
54
"sort-packages" : true ,
55
- "optimize-autoloader" : true
55
+ "optimize-autoloader" : true ,
56
+ "allow-plugins" : {
57
+ "composer/package-versions-deprecated" : false
58
+ }
56
59
}
57
60
}
Original file line number Diff line number Diff line change 1
1
parameters :
2
2
checkMissingIterableValueType : false
3
3
checkGenericClassInNonGenericObjectType : false
4
- ignoreErrors :
5
- - ' #Cannot cast mixed to int #'
4
+
Original file line number Diff line number Diff line change @@ -136,6 +136,8 @@ function () {
136
136
137
137
$ this ->connection ->write ($ buffer );
138
138
$ this ->connection ->close ();
139
+
140
+ $ this ->disableConnectionMonitor ();
139
141
}
140
142
);
141
143
@@ -161,6 +163,8 @@ function(): void
161
163
*/
162
164
public function disconnect (int $ code = 0 , string $ reason = '' ): Promise
163
165
{
166
+ $ this ->disableConnectionMonitor ();
167
+
164
168
return call (
165
169
function () use ($ code , $ reason ) {
166
170
if (\in_array ($ this ->state , [self ::STATE_NOT_CONNECTED , self ::STATE_DISCONNECTING ])) {
@@ -446,4 +450,13 @@ static function (Protocol\AbstractFrame $frame) use ($deferred) {
446
450
447
451
return $ deferred ->promise ();
448
452
}
453
+
454
+ private function disableConnectionMonitor (): void {
455
+ if ($ this ->connectionMonitorWatcherId !== null ) {
456
+
457
+ Loop::cancel ($ this ->connectionMonitorWatcherId );
458
+
459
+ $ this ->connectionMonitorWatcherId = null ;
460
+ }
461
+ }
449
462
}
Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ protected function runTestAsync(...$args)
53
53
54
54
$ return = yield call ([$ this , $ this ->realTestName ], ...$ args );
55
55
56
+ yield $ client ->disconnect ();
57
+
56
58
$ info = Loop::getInfo ();
57
59
$ count = $ info ['enabled_watchers ' ]['referenced ' ];
58
60
You can’t perform that action at this time.
0 commit comments