Hi!

I'm not sure if this expected behaviour or not. I'm trying to create
socket connection that automatically reconnects if something bad
happens.

https://github.com/gflarity/nervous/blob/master/lib/graphite_axon.js#L60

When a socket emits an 'error' event, I destroy the connection. When
the 'close' event happens I reconnect. Most of the time this works but
it doesn't seem to work with ENOTFOUND errors.

 This sort of makes sense to me. The dns lookup fails so node doesn't
even try to create a connection. If the connection doesn't even get
attempted, then there's no reason to emit a 'close' event on that
connection.  But then how do I code around this?

Cheers,
Geoff

-- 
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

Reply via email to