Skip to content

Commit

Permalink
httpsession: cancel other activities when closing
Browse files Browse the repository at this point in the history
This fixes a possible assert after failing to apply filters in tryProcessOutReq. When filtering fails, the state is set to Closing but the outbound request is left alive, and any activity from the outbound request while in that state is unexpected behavior. In general, we don't want concurrent operations going on while we are closing, so to avoid this problem and potentially similar problems we'll ensure other activities are canceled first.
  • Loading branch information
jkarneges committed Sep 6, 2024
1 parent 83f84b4 commit 9d606cc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/handler/httpsession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,9 @@ class HttpSession::Private : public QObject

void prepareToClose()
{
cleanupOutReq();
cleanupAction();

state = Closing;

publishQueue.clear();
Expand Down

0 comments on commit 9d606cc

Please sign in to comment.