Skip to content

Commit b91df03

Browse files
committed
fix: added missing handling of end transaction with added hack
1 parent 2f39134 commit b91df03

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

dependency/lpp/periodic_session/handler.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,19 @@ void PeriodicSession::message(TransactionHandle const& transaction, Message mess
7272
// doesn't match one in the mRequestTransactions.
7373
if (mHackBadTransactionInitiator) {
7474
if (transaction.initiator() == Initiator::LocationServer) {
75+
WARNF("HACK: bad transaction initiator: %s", transaction.to_string().c_str());
7576
auto corrected_transaction = TransactionHandle{
7677
mSession, transaction.id(), transaction.generation_id(), Initiator::TargetDevice};
7778

7879
auto rit = mRequestTransactions.find(corrected_transaction);
7980
if (rit != mRequestTransactions.end()) {
8081
handle_request_response(corrected_transaction, std::move(message));
82+
83+
// To actuall stop the request timeout, we to simulate PeriodicSession::end for the
84+
// correction transaction. If the location server doesn't indicate that the
85+
// transaction has ended - which would be weird - then this is technically
86+
// incorrect. However, this is already a hack...
87+
end(corrected_transaction);
8188
return;
8289
}
8390
}

0 commit comments

Comments
 (0)