nonebot / aiocqhttp

A Python SDK with async I/O for CQHTTP (OneBot).
https://aiocqhttp.nonebot.dev
MIT License
280 stars 39 forks source link

feat: fix httpapi client customized timeout #71

Closed shejialuo closed 1 year ago

shejialuo commented 1 year ago

The SDK provides the api_timeout_sec for better control, however, for HttpApi class, the _timeout_sec is unused. This commit fixes this problem.

shejialuo commented 1 year ago

@cleoold 请问一下,有没有不修改程序代码的功能,对HTTP进行超时的自定义。这个PR毕竟改的东西很少,如果能有,也不需要这个PR合并到主仓库了。

cleoold commented 1 year ago

呃,我覺得這個很有用

On Wed., Jun. 7, 2023, 2:26 a.m. shejialuo, @.***> wrote:

@cleoold https://github.com/cleoold 请问一下,有没有不修改程序代码的功能,对HTTP进行超时的自定义。这个PR毕竟改的东西很少,如果能有,也不需要这个PR合并到主仓库了。

— Reply to this email directly, view it on GitHub https://github.com/nonebot/aiocqhttp/pull/71#issuecomment-1579978826, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKGVB3DGYOUVRJGYIUQ6ELXKANIJANCNFSM6AAAAAAYWU7YBE . You are receiving this because you were mentioned.Message ID: @.***>

shejialuo commented 1 year ago

呃,我覺得這個很有用

On Wed., Jun. 7, 2023, 2:26 a.m. shejialuo, @.***> wrote:

@cleoold https://github.com/cleoold 请问一下,有没有不修改程序代码的功能,对HTTP进行超时的自定义。这个PR毕竟改的东西很少,如果能有,也不需要这个PR合并到主仓库了。

— Reply to this email directly, view it on GitHub https://github.com/nonebot/aiocqhttp/pull/71#issuecomment-1579978826, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKGVB3DGYOUVRJGYIUQ6ELXKANIJANCNFSM6AAAAAAYWU7YBE . You are receiving this because you were mentioned.Message ID: @.***>

如果可以的话,麻烦您能不能review下代码。下游的软件还是比较依赖这个功能的。