> > > Now I know that the reason is, that the server is indeed refusing the > > connection but I was wondering... > > why dosn't it catch the error? why is it uncaught, even though it is > inside > > a try catch statement? > > You're failing to think async. Making the connection, doing the TCP > handshake, etc. are not immediate operations. In short, you need to > add an error listener to your connection object.
works like a charm did I miss the section where all events that a net.connection can throw in the documentation or is it just missing? (or am I the only one not instinctively knowing it has exactly 4 namely data,connection,error and end ?) -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
