feat: 优化支付码队列与支付超时
This commit is contained in:
@@ -1277,7 +1277,7 @@ class HuyaHttpClient:
|
||||
},
|
||||
)
|
||||
try:
|
||||
with self._urlopen(req, timeout=15) as resp:
|
||||
with self._urlopen(req, timeout=30) as resp:
|
||||
resp_data = resp.read()
|
||||
if resp_data[:2] == b"\x1f\x8b":
|
||||
import gzip
|
||||
|
||||
@@ -1416,7 +1416,7 @@ class HuyaWssClient:
|
||||
await self.ws.send(msg.encode())
|
||||
|
||||
try:
|
||||
body = await asyncio.wait_for(future, 15.0)
|
||||
body = await asyncio.wait_for(future, 30.0)
|
||||
except TimeoutError:
|
||||
self._pending.pop(req_id, None)
|
||||
self.logger("[✗] payOrderSubmitV5 超时")
|
||||
|
||||
@@ -306,7 +306,7 @@ class WeiboClient:
|
||||
self,
|
||||
cookie: str = "",
|
||||
*,
|
||||
timeout: float = 20.0,
|
||||
timeout: float = 30.0,
|
||||
session: requests.Session | None = None,
|
||||
):
|
||||
self.cookie = normalize_weibo_cookie(cookie) if cookie else ""
|
||||
|
||||
Reference in New Issue
Block a user