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 — test: resolve race condition in test-net-write-fully-async-* · nodejs/node@20c032e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-net-write-fully-async-buffer.js
    • test-net-write-fully-async-hex-string.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-net-write-fully-async-buffer.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-net-write-fully-async-buffer.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ const data = Buffer.alloc(1000000);
1111

1212
const server = net.createServer(common.mustCall(function(conn) {
1313
conn.resume();
14+
server.close();
1415
})).listen(0, common.mustCall(function() {
1516
const conn = net.createConnection(this.address().port, common.mustCall(() => {
1617
let count = 0;
1718

1819
function writeLoop() {
19-
if (count++ === 200) {
20-
conn.destroy();
21-
server.close();
20+
if (count++ === 20) {
21+
conn.end();
2222
return;
2323
}
2424

Collapse file

‎test/parallel/test-net-write-fully-async-hex-string.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-net-write-fully-async-hex-string.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ const data = Buffer.alloc(1000000).toString('hex');
99

1010
const server = net.createServer(common.mustCall(function(conn) {
1111
conn.resume();
12+
server.close();
1213
})).listen(0, common.mustCall(function() {
1314
const conn = net.createConnection(this.address().port, common.mustCall(() => {
1415
let count = 0;
1516

1617
function writeLoop() {
1718
if (count++ === 20) {
18-
conn.destroy();
19-
server.close();
19+
conn.end();
2020
return;
2121
}
2222

0 commit comments

Comments
0 (0)
You are visitor 01402503 — 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.