Skip to content

Commit e986083

Browse files
authored
Fixed bug that sender does not works for coroutine server. (#2218)
* Fixed bug that call to undefined method Swoole\Http\Response::disconnect(). * Update CHANGELOG-2.0.md
1 parent 86a9c9b commit e986083

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Sender.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ public function __call($name, $arguments)
6666
if ($this->isCoroutineServer) {
6767
if (isset($this->responses[$fd])) {
6868
array_shift($arguments);
69+
if ($method === 'disconnect') {
70+
$method = 'close';
71+
}
6972
$this->responses[$fd]->{$method}(...$arguments);
7073
$this->logger->debug("[WebSocket] Worker send to #{$fd}");
7174
}

0 commit comments

Comments
 (0)