diff --git a/src/inet/UDPEndPointImplLwIP.cpp b/src/inet/UDPEndPointImplLwIP.cpp index edc409e73c9e8d..9679ff94ca064f 100644 --- a/src/inet/UDPEndPointImplLwIP.cpp +++ b/src/inet/UDPEndPointImplLwIP.cpp @@ -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; diff --git a/src/inet/UDPEndPointImplLwIP.h b/src/inet/UDPEndPointImplLwIP.h index 21213c77e976e9..ce5ea05a6fe79e 100644 --- a/src/inet/UDPEndPointImplLwIP.h +++ b/src/inet/UDPEndPointImplLwIP.h @@ -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 mDelayRelease = false; }; using UDPEndPointImpl = UDPEndPointImplLwIP;