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 another ssl context leak #11

Merged
merged 4 commits into from
Mar 27, 2023

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Mar 27, 2023

AsyncTransport creates a wdsl sync client even if its never used which generates yet another ssl context.

I had trouble with reaching the max connections when each service had a separate connection pool which would result in requests failing. Now all services (except snapshots) now use the same connection pool/client which avoids the need to close/create clients over and over. There is still a separate client created per camera.

I picked up the cameras that seemed to have the most issues + the annke (which doesn't) and tested with:

TAPO C320WS
TAPO C110
REOLINK E1 PLUS
LC IPC-TA42-D
SV3C HX SERIES
ANNKE I51DM

IMG_0945

bdraco added 4 commits March 26, 2023 18:24
AsyncTransport creates a wdsl sync client even
if its never used which generates yet another
ssl context
@hunterjm hunterjm merged commit a325256 into openvideolibs:async Mar 27, 2023
bdraco added a commit to home-assistant/core that referenced this pull request Mar 27, 2023
@bdraco bdraco deleted the one_more_context_leak branch April 14, 2023 01:42
bdraco added a commit that referenced this pull request Apr 14, 2023
bdraco added a commit that referenced this pull request Apr 14, 2023
Since zeep will create a wsdl_client with an ssl context
even if we never use it, we can avoid the additional context
creation by passing in our own httpx.Client

This is an alternate solution for #11 which should have
less side effects
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