Skip to content

Commit

Permalink
check if client response is still valid on txn close (#11827)
Browse files Browse the repository at this point in the history
Co-authored-by: Nathan Wang <[email protected]>
  • Loading branch information
sharkleash and Nathan Wang authored Oct 24, 2024
1 parent f322428 commit df63f54
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cripts/Bundles/LogsMetrics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ LogsMetrics::doTxnClose(cripts::Context *context)
{
borrow resp = cripts::Client::Response::Get();

// It's possible that the client response here is not valid, because the client went
// away prematurely.
if (!resp.Initialized()) {
return;
}

// .tcpinfo(bool)
if (_tcpinfo && control.logging.Get()) {
borrow conn = cripts::Client::Connection::Get();
Expand Down

0 comments on commit df63f54

Please sign in to comment.