Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,8 @@ function afterWrite(status, handle, err) {
// callback may come after call to destroy.
if (self.destroyed) {
debug('afterWrite destroyed');
if (this.callback)
this.callback(null);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-invoke-queued.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const server = tls.createServer({
c.destroy();
}));
// Data on next _write() will be written but callback will not be invoked
Comment thread
addaleax marked this conversation as resolved.
Outdated
c.write(' gosh', null, common.mustNotCall());
c.write(' gosh', null, common.mustCall());
}));

server.close();
Expand Down