Created
July 21, 2010 09:53
-
-
Save 3rd-Eden/484285 to your computer and use it in GitHub Desktop.
Connection errors with node do not get send
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> ping 10.211.55.5 | |
PING 10.211.55.5 (10.211.55.5): 56 data bytes | |
Request timeout for icmp_seq 0 | |
Request timeout for icmp_seq 1 | |
Request timeout for icmp_seq 2 | |
Request timeout for icmp_seq 3 | |
ping: sendto: No route to host | |
Request timeout for icmp_seq 4 | |
ping: sendto: Host is down | |
Request timeout for icmp_seq 5 | |
ping: sendto: Host is down | |
Request timeout for icmp_seq 6 | |
ping: sendto: Host is down | |
Request timeout for icmp_seq 7 | |
^C | |
--- 10.211.55.5 ping statistics --- | |
9 packets transmitted, 0 packets received, 100.0% packet loss |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> node test.js | |
ERROR CONNECTION: Error: , Host is down | |
> node test.js | |
ERROR CONNECTION: Error: , Host is down | |
> node test.js | |
ERROR CONNECTION: Error: , Host is down | |
> node test.js | |
ERROR CONNECTION: Error: , Host is down | |
> node test.js | |
ERROR CONNECTION: Error: , Host is down | |
> node test.js | |
^[[A | |
^[[A | |
^[[A | |
^C | |
^ no error response, no nothing ( ^[[A == up and enter ;) ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Stream = require('net').Stream; | |
var connection = new Stream; | |
connection.addListener("error", function( error ){ | |
console.log( "ERROR CONNECTION: " + error ) | |
}); | |
connection.addListener("connect", function( error ){ | |
console.log( "CONNECTED TO SERVER" ) | |
}); | |
connection.connect(11211, "10.211.55.5") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment