Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6fff9ff

Browse filesBrowse files
Trotttargos
authored andcommitted
debugger: allow longer time to connect
Make five attempts with a timeout of 1 second each rather than 10 attempts with a timeout of 500ms each. This is to allow for slower-connecting devices like Raspberry Pi. PR-URL: #38161 Refs: https://github.com/nodejs/node/discussions/36481 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent def85da commit 6fff9ff
Copy full SHA for 6fff9ff

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎lib/internal/inspector/_inspect.js‎

Copy file name to clipboardExpand all lines: lib/internal/inspector/_inspect.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,13 @@ class NodeInspector {
234234
this.stdout.write(' ok\n');
235235
}, (error) => {
236236
debuglog('connect failed', error);
237-
// If it's failed to connect 10 times then print failed message
238-
if (connectionAttempts >= 10) {
237+
// If it's failed to connect 5 times then print failed message
238+
if (connectionAttempts >= 5) {
239239
this.stdout.write(' failed to connect, please retry\n');
240240
process.exit(1);
241241
}
242242

243-
return new Promise((resolve) => setTimeout(resolve, 500))
243+
return new Promise((resolve) => setTimeout(resolve, 1000))
244244
.then(attemptConnect);
245245
});
246246
};

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.