Skip to content

Commit

Permalink
EAGAIN comment
Browse files Browse the repository at this point in the history
  • Loading branch information
atlowChemi committed Aug 20, 2023
1 parent 35a1172 commit 6fe4e14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/internal/fs/streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ WriteStream.prototype._construct = _construct;

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

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

0 comments on commit 6fe4e14

Please sign in to comment.