Skip to content

Commit

Permalink
Remove unnecessary check whether the channel is open before closing
Browse files Browse the repository at this point in the history
  • Loading branch information
VeithMetro committed Oct 24, 2024
1 parent 9688730 commit 58925da
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions MessageControl/MessageOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ namespace Publishers {
}
UDPOutput::Channel::~Channel()
{
if (IsOpen() == true) {
Close(Core::infinite);
}
Close(Core::infinite);
}

uint16_t UDPOutput::Channel::SendData(uint8_t* dataFrame, const uint16_t maxSendSize)
Expand Down Expand Up @@ -186,9 +184,7 @@ namespace Publishers {
ASSERT(_output.IsOpen() == true);
}
else {
if (_output.IsOpen() == true) {
_output.Close(Core::infinite);
}
_output.Close(Core::infinite);
}
}

Expand Down

0 comments on commit 58925da

Please sign in to comment.