Skip to content

Commit

Permalink
test: Don't capture local objects by reference in lambda (#38505)
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Krinkin <mkrinkin@microsoft.com>
  • Loading branch information
krinkinmu authored Feb 20, 2025
1 parent bcaa95f commit f1e276f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/integration/fake_upstream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ AssertionResult FakeUpstream::runOnDispatcherThreadAndWait(std::function<Asserti

void FakeUpstream::runOnDispatcherThread(std::function<void()> cb) {
ASSERT(!dispatcher_->isThreadSafe());
dispatcher_->post([&]() { cb(); });
dispatcher_->post([cb = std::move(cb)]() { cb(); });
}

void FakeUpstream::sendUdpDatagram(const std::string& buffer,
Expand Down

0 comments on commit f1e276f

Please sign in to comment.