diff --git a/src/transport/SessionManager.h b/src/transport/SessionManager.h index 2c3978355c4b4d..e58327296e8bf8 100644 --- a/src/transport/SessionManager.h +++ b/src/transport/SessionManager.h @@ -209,7 +209,8 @@ class DLL_EXPORT SessionManager : public TransportMgrDelegate { // Allocate ephemeralInitiatorNodeID in Operational Node ID range NodeId ephemeralInitiatorNodeID; - do { + do + { ephemeralInitiatorNodeID = static_cast(Crypto::GetRandU64()); } while (!IsOperationalNodeId(ephemeralInitiatorNodeID)); return mUnauthenticatedSessions.AllocInitiator(ephemeralInitiatorNodeID, peerAddress, config);