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 session allocation loop when shutting down with an open commissioning window. #20715

Commits on Jul 14, 2022

  1. Fix session allocation loop when shutting down with an open commissio…

    …ning window.
    
    After project-chip#20487 if we shut down with a commissioning window open we end up in a
    loop where the session manager shutdown marks the tentative PASE session for
    eviction, we treat that as a commissioning error and start listening for PASE
    again, creating a new session, etc.  With a heap pool this ends up happening to
    work in that we keep evicting the new sessions until we hit the 20-attempt limit
    and close the commissioning window.  With a non-heap pool, I sort of wonder what
    happens, exactly.
    
    The fix here is in two parts, with either part enough on its own to fix the
    behavior described above:
    
    1) Shut down the commissioning window manager earlier, before we shut down the
       session manager.  And correspondingly move its initialization during server
       init later.
    
    2) Once session manager starts shutdown, refuse to create any new sessions.
    bzbarsky-apple committed Jul 14, 2022
    Configuration menu
    Copy the full SHA
    78c92ec View commit details
    Browse the repository at this point in the history
  2. Fix unit tests.

    bzbarsky-apple committed Jul 14, 2022
    Configuration menu
    Copy the full SHA
    3df266b View commit details
    Browse the repository at this point in the history