Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix blocking I/O in shares Parser #13

Merged
merged 5 commits into from
Sep 9, 2024
Merged

Fix blocking I/O in shares Parser #13

merged 5 commits into from
Sep 9, 2024

Conversation

chris-mc1
Copy link
Contributor

This pull request fix two Issues related to the Parser blocking the event loop

  1. Replaces the usage of requests.get() inside the shares parsers with httpx, so there is no longer any blocking i/o inside the event loop (with requests to ShareList.php taking upwards of 5 minutes this caused websocket and mqtt to disconnect as seen in False positive connectivity #9 and The connection connects but than after a minute disconnects #7 )
  2. moves parser calls into their own async task to prevent blocking the websocket receive loop

@IDmedia IDmedia merged commit f0c4800 into IDmedia:main Sep 9, 2024
@IDmedia
Copy link
Owner

IDmedia commented Sep 9, 2024

Thanks for your commit @chris-mc1 :)

I think this looks good except you forgot to change line 119 in parser.py:
96adb2a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants