Skip to content

Commit

Permalink
fix broken async client usage
Browse files Browse the repository at this point in the history
  • Loading branch information
denniswittich committed Sep 16, 2024
1 parent c22d460 commit 65772ad
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rosys/vision/rtsp_camera/jovision_rtsp_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class JovisionInterface:

def __init__(self, ip: str) -> None:
self.ip = ip
self.async_client = httpx.AsyncClient()

@property
def settings_url(self) -> str:
Expand Down Expand Up @@ -69,7 +68,7 @@ async def _send_settings(self, settings: list[JovisionCameraSettings]) -> None:
cmd=json.dumps(cmd),
_=int(time.time() * 1000), # current time as a timestamp
)
async with self.async_client as client:
async with httpx.AsyncClient() as client:
await client.get(self.settings_url, params=params)

async def set_fps(self, stream_id: int, fps: int) -> None:
Expand Down

0 comments on commit 65772ad

Please sign in to comment.