Skip to content

Commit 0a70daa

Browse files
committed
remove unnecessary reset
1 parent b1ec5cb commit 0a70daa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/fixed_queue.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ module.exports = class FixedQueue {
123123
let nextBuf = this._spare;
124124
if (nextBuf !== null) {
125125
this._spare = null;
126-
nextBuf.reset();
127126
} else {
128127
nextBuf = new FixedCircularBuffer();
129128
}
@@ -140,7 +139,8 @@ module.exports = class FixedQueue {
140139
this.tail = tail.next;
141140
// Place the emptied buffer into the spare slot for potential reuse.
142141
tail.reset();
143-
this._spare = tail; // Overwrite any existing spare
142+
// Overwrite any existing spare
143+
this._spare = tail;
144144
}
145145
return next;
146146
}

0 commit comments

Comments
 (0)