Skip to content

Commit

Permalink
Merge pull request #562 from mousetraps/i466
Browse files Browse the repository at this point in the history
#466 Debugger does not start reliably running Node.js console app
  • Loading branch information
mousetraps committed Oct 22, 2015
2 parents e2a97de + b57da3c commit fb5c884
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ sealed class DebuggerConnection : IDebuggerConnection {
lock (_networkClientLock) {
int connection_attempts = 0;
const int MAX_ATTEMPTS = 5;
while (!_isClosed) {
while (true) {
connection_attempts++;
try {
// TODO: This currently results in a call to the synchronous TcpClient
Expand All @@ -147,7 +147,7 @@ sealed class DebuggerConnection : IDebuggerConnection {
throw;
}
LiveLogger.WriteLine("Connection attempt {0} failed with: {1}", connection_attempts, ex);
if (connection_attempts >= MAX_ATTEMPTS) {
if (connection_attempts >= MAX_ATTEMPTS && !_isClosed) {
throw;
}
else {
Expand Down

0 comments on commit fb5c884

Please sign in to comment.