Skip to content

Commit

Permalink
Merge branch 'main' into jkarneges/timer-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jkarneges authored Feb 25, 2025
2 parents c01896a + 0d66c35 commit 1c5abec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/handler/handlerengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -826,8 +826,9 @@ class AcceptWorker : public Deferred

QList<std::shared_ptr<HttpSession>> takeSessions()
{
QList<std::shared_ptr<HttpSession>> out = sessions;
sessions.clear();
// swap instead of std::move since sessions is a member and should have a known state
QList<std::shared_ptr<HttpSession>> out;
out.swap(sessions);

foreach(const std::shared_ptr<HttpSession> &hs, out)
hs->setParent(0);
Expand Down

0 comments on commit 1c5abec

Please sign in to comment.