Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information