diff --git a/lib/dgram.js b/lib/dgram.js index 94f44d520220ff..0812b3213d1007 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -527,8 +527,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) {