소스 검색

Send TIMEOUT checkpoint on asyncio.TimeoutErrors

Tulir Asokan 2 년 전
부모
커밋
97586e26d4
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      mautrix_instagram/portal.py

+ 2 - 0
mautrix_instagram/portal.py

@@ -330,6 +330,8 @@ class Portal(DBPortal, BasePortal):
     def _status_from_exception(e: Exception) -> MessageSendCheckpointStatus:
         if isinstance(e, NotImplementedError):
             return MessageSendCheckpointStatus.UNSUPPORTED
+        elif isinstance(e, asyncio.TimeoutError):
+            return MessageSendCheckpointStatus.TIMEOUT
         return MessageSendCheckpointStatus.PERM_FAILURE
 
     async def handle_matrix_message(