You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stability various even for Tencent wechat server, so setting a long timeout may needed, default is 20 seconds if not set.
通常来说,用户都会以为默认是请求超过 20 秒就会被判定为超时,并中断
但实际上:
# lib/wechat/http_client.rb line 9 in wechat.gem# timeout = 20 by default@httprb=HTTP.timeout(:global,write: timeout,connect: timeout,read: timeout)# lib/http/timeout/global.rb in http.gemdefinitialize(*args)superreset_counterend# To future me: Don't remove this again, past you was smarter.defreset_counter@time_left=connect_timeout + read_timeout + write_timeout@total_timeout=time_leftend
也就是说,实际允许的超时时间最大可能是设定值的 3 倍,即 60 秒.
The text was updated successfully, but these errors were encountered:
文档中提到:
通常来说,用户都会以为默认是请求超过 20 秒就会被判定为超时,并中断
但实际上:
也就是说,实际允许的超时时间最大可能是设定值的 3 倍,即 60 秒.
The text was updated successfully, but these errors were encountered: