Skip to content

Commit

Permalink
fix: 避免重复读取流对象
Browse files Browse the repository at this point in the history
  • Loading branch information
z2z63 committed Nov 15, 2024
1 parent a1379cb commit b9d7d7d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vchat/net/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from abc import ABC
from collections.abc import Callable, Iterable
from typing import Optional, Literal
import json

from aiohttp import ClientError

Expand Down Expand Up @@ -82,7 +83,7 @@ async def get_msg(self) -> tuple[Iterable[RawMessage], Iterable[Contact]]:
dic = await resp.json(content_type=None)
if dic["BaseResponse"]["Ret"] != 0:
logger.warning(
"sync message failed, server return: %s", await resp.text()
"sync message failed, server return: %s", json.dumps(dic)
)
raise VOperationFailedError("获取新消息失败,请重新登录")
self.login_info.SyncKey = dic["SyncKey"]
Expand Down

0 comments on commit b9d7d7d

Please sign in to comment.