async function waitSessionCountChange(currentSessionCountMonitoredItem) {

    return await new Promise((resolve,reject) => {
        const timer = setTimeout(() => {
            reject(new Error("Never received ", currentSessionCountMonitoredItem.toString()));
        }, 5000);

        currentSessionCountMonitoredItem.once("changed", function (dataValue) {
            clearTimeout(timer);
            const new_currentSessionCount = dataValue.value.value;
            debugLog("new currentSessionCount=", dataValue.toString());
            resolve(new_currentSessionCount);
        });
    });
}
The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.