GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: only set JSStreamWrap write req after `write()` · nodejs/node@fa691f7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal
    • wrap_js_stream.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/wrap_js_stream.js‎

Copy file name to clipboardExpand all lines: lib/internal/wrap_js_stream.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ class JSStreamWrap extends Socket {
137137
doWrite(req, bufs) {
138138
assert.strictEqual(this[kCurrentWriteRequest], null);
139139
assert.strictEqual(this[kCurrentShutdownRequest], null);
140-
this[kCurrentWriteRequest] = req;
141140

142141
const handle = this._handle;
143142
const self = this;
@@ -149,6 +148,9 @@ class JSStreamWrap extends Socket {
149148
this.stream.write(bufs[i], done);
150149
this.stream.uncork();
151150

151+
// Only set the request here, because the `write()` calls could throw.
152+
this[kCurrentWriteRequest] = req;
153+
152154
function done(err) {
153155
if (!err && --pending !== 0)
154156
return;

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.