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

WiFiClientSecure owns context, fix stopAllExcept #8136

Merged
merged 4 commits into from
Jun 20, 2021

Commits on Jun 17, 2021

  1. WiFiClientSecure owns context, fix stopAllExcept

    Fixes esp8266#8079
    
    Because WiFiClientSecure inherits WiFiClient, and WiFiClientSecureCtx also
    inherits WiFiClient, they both end up in the list of TCP connections that
    are used for WiFiClient::stopAllExcept().  This would cause the underlying
    SSL connection to be closed whenever you attempted to
    stopAllExcept(WiFiClientSecure)
    
    Fix by adding a "_owner" pointer in the WiFiClient object which points to
    nullptr (default case) or to the associated upper-layer connection.
    When stopping all connections except one, only look at the uppermost
    connections.
    earlephilhower committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    d2b0178 View commit details
    Browse the repository at this point in the history
  2. Reverse logic, use lowest-level Ctx for match

    Because there may be multiple copies of the WiFiClientSecure, but only
    a single WiFiClientCtx, use the Ctx to check for relatedness on connections.
    This will avoid closing SSL connections that were assignment copies.
    earlephilhower committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    415e888 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a79739d View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2021

  1. Configuration menu
    Copy the full SHA
    62656cb View commit details
    Browse the repository at this point in the history