diff --git a/lib/dgram.js b/lib/dgram.js index 5f7e8f032cf998..b17def6cec9d1c 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -532,8 +532,8 @@ function clearQueue() { state.queue = undefined; // Flush the send queue. - for (let i = 0; i < queue.length; i++) - queue[i](); + for (const queueEntry of queue) + queueEntry(); } function isConnected(self) {