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

Redirect error msg responses without sessionId to all sessions and the connection #985

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Oct 5, 2023

  1. Add case to redirect error responses early

    If we receive an error response with an id, but not sessionId, there's
    a slim chance that this response should be redirected to a session
    but will instead be redirected to the connection's event loop. This
    means that there is a chance that we could end up with a handler that
    is waiting for a response indefinitely (or until a timeout occurs).
    
    Since we cannot know exactly which session the response should be
    redirected to, we're sending it to all live sessions as well as the
    connection's event loop.
    
    Most handlers should ignore the extra error message, and the handler
    waiting for the msg with the unique msgId will action on it. If no
    handlers are alive or the session has already been closed that this
    response msg should go to, then no handlers will action on it either.
    ankur22 committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    fb64599 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0dd486e View commit details
    Browse the repository at this point in the history
  3. Refactor session handling for error msg

    This makes it simpler to work with the mutex
    ankur22 committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    71cf2dc View commit details
    Browse the repository at this point in the history