substack/dnode-ruby — Issue #2: How to handle a "dead server"?
Author: superfeedr
Created: 2011-11-08 22:54:17+00:00
State: open

One of the things I really like in nodejs is the convention for callbacks to start with an error and an object (the one expected). As far as I know, node also takes care of timeouts and calls the callback with the right error. This way you have a "continuous" execution. EM probably did not benefit from this convention, but I think your library ought to live up to node's conventions!

For now your client never calls the callback is the server is dead... which is a problem. What you want is that if the server is dead (or for any kind of error as a matter of facts, is that the callback (proc) is always called, no matter what, with an error should it be needed.

Does it make sense? Would you accept a pull request?