-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
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
upd keep_alive configuration and behavior desc #37
Conversation
为什么非重定向请求的就可以长连接呢 哪里的代码逻辑有问题? |
你问题问错了,是 重定向请求你是同一个Swoole http client自动接续完成的(判断了header里面的location,更新当前的$request的目的地然后继续exec(),同服务器和端口的情况下,Swoole http client会自动使用keepalive连接) Lines 670 to 711 in b845add
而我每次对同一个服务器即使是同一个URL请求你也是重新生成一个$request,然后 这个新生成的$request是没有绑定Swoole http client,然后你从这个代码里面生成了一个新客户端 Line 515 in 5cd1134
根源还是$request和实际发送请求的客户端绑定的设计导致的 其实有workaround可以修复的,但你说只接受文档更新嘛 |
写错了 你也可以pr修复补丁 |
OK 那我重新开个PR |
#35 (comment)