Skip to content

Commit fb5c884

Browse files
committed
Merge pull request #562 from mousetraps/i466
#466 Debugger does not start reliably running Node.js console app
2 parents e2a97de + b57da3c commit fb5c884

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Nodejs/Product/Nodejs/Debugger/Communication/DebuggerConnection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public void Connect(Uri uri) {
122122
lock (_networkClientLock) {
123123
int connection_attempts = 0;
124124
const int MAX_ATTEMPTS = 5;
125-
while (!_isClosed) {
125+
while (true) {
126126
connection_attempts++;
127127
try {
128128
// TODO: This currently results in a call to the synchronous TcpClient
@@ -147,7 +147,7 @@ public void Connect(Uri uri) {
147147
throw;
148148
}
149149
LiveLogger.WriteLine("Connection attempt {0} failed with: {1}", connection_attempts, ex);
150-
if (connection_attempts >= MAX_ATTEMPTS) {
150+
if (connection_attempts >= MAX_ATTEMPTS && !_isClosed) {
151151
throw;
152152
}
153153
else {

0 commit comments

Comments
 (0)