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

Go back to a session per command #106

Merged
merged 1 commit into from
Mar 6, 2019
Merged

Go back to a session per command #106

merged 1 commit into from
Mar 6, 2019

Conversation

pnbruckner
Copy link
Collaborator

The consensus seems to be that requests.Session is not thread safe; at least, not in all circumstances. Although no problems have been experienced with reusing sessions across threads, to be on the safe side, go back to creating a new session for each command. Rename _get_session method to get_session and leave in place in case someone wants to subclass AmcrestCamera and override it.

The consensus seems to be that requests.Session is not thread safe; at least, not in all circumstances. Although no problems have been experienced with reusing sessions across threads, to be on the safe side, go back to creating a new session for each command. Rename _get_session method to get_session and leave in place in case someone wants to subclass AmcrestCamera and override it.
@tchellomello tchellomello merged commit 3d7b0ce into master Mar 6, 2019
@tchellomello tchellomello deleted the requests-session branch March 6, 2019 20:39
@tchellomello
Copy link
Owner

Thanks @pnbruckner

@tchellomello tchellomello mentioned this pull request Mar 6, 2019
@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 33.231% when pulling d6c15f7 on requests-session into 96fbf5b on master.

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.

3 participants