Skip to content

Commit

Permalink
Merge pull request #1090 from doronz88/bugfix/tunneld-streamerror
Browse files Browse the repository at this point in the history
tunneld: gracefully handle StreamError
  • Loading branch information
doronz88 authored Jun 23, 2024
2 parents 0e7b26a + 6ffa11a commit 2160879
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pymobiledevice3/tunneld.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import fastapi
import requests
import uvicorn
from construct import StreamError
from fastapi import FastAPI
from packaging.version import Version

Expand Down Expand Up @@ -212,8 +213,8 @@ async def start_tunnel_task(
f'since there is already an active one for same udid')
except asyncio.CancelledError:
pass
except ConnectionResetError:
logger.debug(f'got ConnectionResetError from {asyncio.current_task().get_name()}')
except (ConnectionResetError, StreamError) as e:
logger.debug(f'got {e.__class__.__name__} from {asyncio.current_task().get_name()}')
except (asyncio.exceptions.IncompleteReadError, TimeoutError, OSError) as e:
logger.debug(f'got {e.__class__.__name__} from tunnel --rsd {tun.address} {tun.port}')
except Exception:
Expand Down

0 comments on commit 2160879

Please sign in to comment.