diff --git a/src/inet/UDPEndPoint.cpp b/src/inet/UDPEndPoint.cpp index 0af80423861c81..1c539697b3787a 100644 --- a/src/inet/UDPEndPoint.cpp +++ b/src/inet/UDPEndPoint.cpp @@ -649,6 +649,10 @@ INET_ERROR UDPEndPoint::SendMsg(const IPPacketInfo * pktInfo, System::PacketBuff SuccessOrExit(res); res = IPEndPointBasis::SendMsg(pktInfo, std::move(msg), sendFlags); + + // Wait for ability to write on this endpoint. + mSocket.SetCallback(HandlePendingIO, reinterpret_cast(this)); + mSocket.OnRequestCallbackOnPendingWrite(); #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS #if CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK