lib: make debug client connect to 127.0.0.1
authorBen Noordhuis <info@bnoordhuis.nl>
Fri, 6 Feb 2015 15:32:35 +0000 (16:32 +0100)
committerBen Noordhuis <info@bnoordhuis.nl>
Fri, 6 Feb 2015 15:49:47 +0000 (16:49 +0100)
On machines without network connectivity, a DNS lookup for 'localhost'
may fail.  Connect to 127.0.0.1 to skip the host resolve step.

Fixes: https://github.com/iojs/io.js/issues/726
PR-URL: https://github.com/iojs/io.js/pull/741
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
lib/_debugger.js

index 955080f..7881d72 100644 (file)
@@ -1620,7 +1620,7 @@ Interface.prototype.trySpawn = function(cb) {
   var self = this,
       breakpoints = this.breakpoints || [],
       port = exports.port,
-      host = 'localhost',
+      host = '127.0.0.1',
       childArgs = this.args;
 
   this.killChild();