Skip to content

Commit 9070585

Browse files
committed
debugger: do not repeat connection message when disconnecting
Fixes: #39272
1 parent 6463adf commit 9070585

2 files changed

Lines changed: 3 additions & 29 deletions

File tree

src/inspector_socket_server.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,6 @@ void InspectorSocketServer::SessionTerminated(int session_id) {
295295
}
296296
connected_sessions_.erase(session_id);
297297
if (connected_sessions_.empty()) {
298-
if (was_attached && state_ == ServerState::kRunning
299-
&& !server_sockets_.empty()) {
300-
PrintDebuggerReadyMessage(host_,
301-
server_sockets_,
302-
delegate_->GetTargetIds(),
303-
inspect_publish_uid_.console,
304-
out_);
305-
}
306298
if (state_ == ServerState::kStopped) {
307299
delegate_.reset();
308300
}

test/known_issues/test-debugger-restart-message.js renamed to test/sequential/test-debugger-restart-message.js

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,12 @@
11
'use strict';
22

3-
// Refs: https://github.com/nodejs/node/issues/39272
4-
53
const common = require('../common');
64

7-
const assert = require('assert');
8-
9-
// When this is moved out of known_issues, this skip can be removed.
10-
if (common.isOSX) {
11-
assert.fail('does not fail reliably on macOS in CI');
12-
}
5+
common.skipIfInspectorDisabled();
136

14-
// When this is moved out of known_issues, this can be removed and replaced with
15-
// the commented-out use of common.skipIfInspectorDisabled() below.
16-
if (!process.features.inspector) {
17-
assert.fail('Known issues test should fail, so if the inspector is disabled');
18-
}
19-
20-
// Will need to uncomment this when moved out of known_issues.
21-
// common.skipIfInspectorDisabled();
7+
const assert = require('assert');
228

23-
// This can be reduced to 2 or even 1 (and the loop removed) once the debugger
24-
// is fixed. It's set higher to make sure that the error is tripped reliably
25-
// in CI. On most systems, the error will be tripped on the first test, but
26-
// on a few platforms in CI, it needs to be many times.
27-
const RESTARTS = 16;
9+
const RESTARTS = 10;
2810

2911
const fixtures = require('../common/fixtures');
3012
const startCLI = require('../common/debugger');

0 commit comments

Comments
 (0)