首页
下载
文档
社区
视频
捐赠
源代码
赞助商
AOT 编译器
AI 助理
商业产品
PHP AOT 原生编译器
Swoole-Compiler 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
swoole_http_client 发包时报错,且不执行回调函数
错误日志为: ``` PHP Warning: Swoole\Http\Client::post(): Operation now in progress phase 2. ``` 和 ``` PHP Warning: Swoole\Http\Client::execute(): Operation now in progress phase 2. ``` 此时不会执行回调函数,就算设置了`timeout`也不生效。`client`在创建时的配置为 ```php [ 'timeout' => 30, 'keep_alive' => true ] ``` 版本为`1.9.23`,PHP为`7.1.6`
发布于7年前 · 1 次浏览 · 来自
提问
章
章鱼哥
错误日志为: ``` PHP Warning: Swoole\Http\Client::post(): Operation now in progress phase 2. ``` 和 ``` PHP Warning: Swoole\Http\Client::execute(): Operation now in progress phase 2. ``` 此时不会执行回调函数,就算设置了`timeout`也不生效。`client`在创建时的配置为 ```php [ 'timeout' => 30, 'keep_alive' => true ] ``` 版本为`1.9.23`,PHP为`7.1.6`
赞
0
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
登录
后参与评论
评论
2019-04-11
苏
苏东旭
尝试将`keep_alive`设置为`1`,这是一个已知的`BUG`,对`keep_alive`参数接收有误。`1.9.24`中已修复。
赞
0
回复
2019-04-11
c
ctwhjt
刚才看了一眼源码,我在复用连接的时候,状态是为`HTTP_CLIENT_STATE_BUSY`才会触发上面的bug。 不过这就奇怪了,这些client对象我都是执行了回调函数之后才会进行复用逻辑,不应该会触发这个问题的呀...
赞
0
回复