Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Junior Martinez <[email protected]>
  • Loading branch information
mkardous-silabs and jmartinez-silabs authored Oct 3, 2023
1 parent bcb60db commit cb15dc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/messaging/ExchangeContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ CHIP_ERROR ExchangeContext::HandleMessage(uint32_t messageCounter, const Payload
ExchangeHandle ref(*this);

// If we received a message from the Peer and we are still expecting a response, we know the peer is active
// If we receive a message from the Peer but if we are not expecting a response, we don't know if the peer is still active
// If we receive a message from the Peer but we are not expecting a response, we don't know if the peer is still active
mIsPeerActive = IsResponseExpected();

bool isStandaloneAck = payloadHeader.HasMessageType(Protocols::SecureChannel::MsgType::StandaloneAck);
Expand Down Expand Up @@ -632,7 +632,7 @@ CHIP_ERROR ExchangeContext::HandleMessage(uint32_t messageCounter, const Payload
// is implicitly that response.
SetResponseExpected(false);

// If we received the expected response, we don't if the peer is still active after having sent the response
// If we received the expected response, we don't know if the peer is still active after having sent the response
mIsPeerActive = false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/messaging/ExchangeContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class DLL_EXPORT ExchangeContext : public ReliableMessageContext,
/**
* Functions checks with information available in the ExchangeContext if the peer is active or not
*
* IF group exchange -> peer is never active
* If group exchange -> peer is never active
* If we are not initiator -> peer is active
* If ephemeral context -> peer is active
* If we received a message and expect a response -> peer is active
Expand Down

0 comments on commit cb15dc0

Please sign in to comment.