Skip to content

Commit

Permalink
捕获anyio.EndOfStream请求代理异常
Browse files Browse the repository at this point in the history
  • Loading branch information
auqhjjqdo committed Jan 11, 2024
1 parent d01688c commit 1404cc7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions live_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from typing import Dict, Tuple, Union
from urllib.parse import parse_qs

import anyio
import ffmpeg
import httpx
import jsengine
Expand Down Expand Up @@ -67,6 +68,8 @@ async def request(self, method, url, **kwargs):
raise ConnectionError(f'{self.flag}直播检测请求协议错误\n{error}')
except httpx.HTTPError as error:
raise ConnectionError(f'{self.flag}直播检测请求错误\n{repr(error)}')
except anyio.EndOfStream as error:
raise ConnectionError(f'{self.flag}直播检测代理错误\n{error}')

def get_client(self):
client_kwargs = {
Expand Down

0 comments on commit 1404cc7

Please sign in to comment.