فهرست منبع

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(