Skip to content

Commit

Permalink
Use std::atomic<bool> instead of bool
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca committed Aug 24, 2022
1 parent 28485d5 commit 0ff68f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/inet/UDPEndPointImplLwIP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ void UDPEndPointImplLwIP::CloseImpl()
// event pending in the event queue (SystemLayer::ScheduleLambda), we
// schedule a release call to the end of the queue, to ensure that the
// queued pointer to UDPEndPointImplLwIP is not dangling.
if (mDelayRelease == true)
if (mDelayRelease)
{
mDelayRelease = false;

Expand Down
2 changes: 1 addition & 1 deletion src/inet/UDPEndPointImplLwIP.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class UDPEndPointImplLwIP : public UDPEndPoint, public EndPointStateLwIP
static void LwIPReceiveUDPMessage(void * arg, struct udp_pcb * pcb, struct pbuf * p, const ip_addr_t * addr, u16_t port);

udp_pcb * mUDP; // LwIP User datagram protocol (UDP) control block.
bool mDelayRelease = false;
std::atomic<bool> mDelayRelease = false;
};

using UDPEndPointImpl = UDPEndPointImplLwIP;
Expand Down

0 comments on commit 0ff68f4

Please sign in to comment.