Skip to content

Commit

Permalink
Don't log kNone events in BdxTransferDiagnosticLog::HandleTransferSes…
Browse files Browse the repository at this point in the history
…sionOutput. (project-chip#37458)

We get a lot of them because of the polling setup, and all they mean is "we have
not gotten the next thing from the other side yet".
  • Loading branch information
bzbarsky-apple authored Feb 7, 2025
1 parent a2d94d2 commit 372345e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/protocols/bdx/BdxTransferDiagnosticLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ void BdxTransferDiagnosticLog::HandleTransferSessionOutput(TransferSession::Outp
{
assertChipStackLockedByCurrentThread();

if (event.EventType == TransferSession::OutputEventType::kNone)
{
// Because we are polling for output every 50ms on our transfer session,
// we will get a lot of kNone events coming through here: one for every
// time we poll but the other side has not sent anything new yet. Just
// ignore those here, for now, and make sure not to log them, because
// that bloats the logs pretty quickly.
return;
}

ChipLogDetail(BDX, "Got an event %s", event.ToString(event.EventType));

switch (event.EventType)
Expand Down Expand Up @@ -71,7 +81,7 @@ void BdxTransferDiagnosticLog::HandleTransferSessionOutput(TransferSession::Outp
}
break;
case TransferSession::OutputEventType::kAckEOFReceived:
case TransferSession::OutputEventType::kNone:
// case TransferSession::OutputEventType::kNone: handled above.
case TransferSession::OutputEventType::kQueryWithSkipReceived:
case TransferSession::OutputEventType::kQueryReceived:
case TransferSession::OutputEventType::kAckReceived:
Expand Down

0 comments on commit 372345e

Please sign in to comment.