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

Add close method to app #371

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Add close method to app #371

wants to merge 1 commit into from

Commits on Jun 21, 2021

  1. Add close method to app

    Fixes Issue AzureAD#370 Session/socket never closed, warnings shown
    
    The msal application does not close its resources like eg: self.http_client.
    As a result a 'ResourceWarning unclosed <ssl.SSLSocket' is shown when the
    app goes out of scope (when warnings are enabled)
    
    This fix adds and explicit close method so developers can cleanly close
    the app if they so desire.
    In __init__ we trap and close the exception explicitely as users cannot
    call close when __init__ fails.
    Finally we don't close the http_client if it's externally managed.
    Hans Weltar authored and Karsten Verelst committed Jun 21, 2021
    Configuration menu
    Copy the full SHA
    6ec44b1 View commit details
    Browse the repository at this point in the history