瀏覽代碼

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(