We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请求结束后服务端未正确关闭, 还是我的使用方式有些问题?
简单实现一个HTTP协程服务
<?php declare(strict_types=1); use Swoole\Coroutine\Http\Server; use function Swoole\Coroutine\run; run(function () { try { $server = new Server('127.0.0.1', 9501, false); $server->handle('/', function ($request, $response) { try { $response->end('finished'); } catch (\Throwable $th) { var_dump($th->getMessage()); } }); $server->start(); } catch (\Throwable $th) { var_dump($th->getMessage()); } });
通过curl请求
curl -w "\n" http://127.0.0.1:9501/ finished
查看连接
netstat -ano | grep 9501 tcp 0 0 127.0.0.1:9501 0.0.0.0:* LISTEN off (0.00/0/0) tcp 0 0 127.0.0.1:9501 127.0.0.1:40186 CLOSE_WAIT off (0.00/0/0) tcp 0 0 127.0.0.1:9501 127.0.0.1:54560 CLOSE_WAIT off (0.00/0/0)
swoole 版本信息
php --ri swoole swoole Swoole => enabled Author => Swoole Team <team@swoole.com> Version => 5.1.0 Built => Oct 29 2023 14:12:40 coroutine => enabled with boost asm context epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled openssl => OpenSSL 3.0.2 15 Mar 2022 dtls => enabled http2 => enabled json => enabled curl-native => enabled c-ares => 1.18.1 zlib => 1.2.11 mutex_timedlock => enabled pthread_barrier => enabled futex => enabled async_redis => enabled Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On swoole.enable_fiber_mock => Off => Off swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => Off => Off swoole.unixsock_buffer_size => 8388608 => 8388608
The text was updated successfully, but these errors were encountered:
可以试试master分支,我在master分支没有发现这个问题
Sorry, something went wrong.
Fixed by #5163
master分支没问题, 谢谢啦
No branches or pull requests
请求结束后服务端未正确关闭, 还是我的使用方式有些问题?
简单实现一个HTTP协程服务
通过curl请求
curl -w "\n" http://127.0.0.1:9501/ finished
查看连接
swoole 版本信息
The text was updated successfully, but these errors were encountered: