Skip to content

Commit 6fe4e14

Browse files
committed
EAGAIN comment
1 parent 35a1172 commit 6fe4e14

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/internal/fs/streams.js

+2
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ WriteStream.prototype._construct = _construct;
395395

396396
function writeAll(data, size, pos, cb, retries = 0) {
397397
this[kFs].write(this.fd, data, 0, size, pos, (er, bytesWritten, buffer) => {
398+
// No data currently available and operation should be retried later.
398399
if (er?.code === 'EAGAIN') {
399400
er = null;
400401
bytesWritten = 0;
@@ -423,6 +424,7 @@ function writeAll(data, size, pos, cb, retries = 0) {
423424

424425
function writevAll(chunks, size, pos, cb, retries = 0) {
425426
this[kFs].writev(this.fd, chunks, this.pos, (er, bytesWritten, buffers) => {
427+
// No data currently available and operation should be retried later.
426428
if (er?.code === 'EAGAIN') {
427429
er = null;
428430
bytesWritten = 0;

0 commit comments

Comments
 (0)