Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
quic: fix _writev() signature
Browse files Browse the repository at this point in the history
PR-URL: #143
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
addaleax authored and jasnell committed Oct 1, 2019
1 parent 368f305 commit 2efb9bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/internal/quic/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2214,7 +2214,7 @@ class QuicStream extends Duplex {
this[kWriteGeneric](false, data, encoding, cb);
}

_writev(data, encoding, cb) {
_writev(data, cb) {
this[kWriteGeneric](true, data, '', cb);
}

Expand Down
6 changes: 3 additions & 3 deletions test/parallel/test-quic-packetloss.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ server.on('ready', common.mustCall(() => {
let n = 0;
function sendChunk() {
if (n < kData.length) {
stream.write(kData[n++]);
stream.write(kData[n++], common.mustCall());
setImmediate(sendChunk);
} else {
stream.end();
Expand All @@ -86,10 +86,10 @@ server.on('ready', common.mustCall(() => {
stream.resume();
stream.setEncoding('utf8');
stream.on('data', (chunk) => data += chunk);
stream.on('end', () => {
stream.on('end', common.mustCall(() => {
console.log(data, data.length);
assert.strictEqual(data, kData);
});
}));

stream.on('close', common.mustCall(() => {
debug('Bidirectional, Client-initiated stream %d closed', stream.id);
Expand Down

0 comments on commit 2efb9bb

Please sign in to comment.