Skip to content

How to detect server crash ? #62

Closed
t8g opened this Issue Aug 12, 2011 · 2 comments

3 participants

@t8g
t8g commented Aug 12, 2011

Is there a way to detect server crash after connexion ?

In the following gist, the scenario :

  1. launch server
  2. launch client (a interval call to the client)
  3. kill server

... and I can't find a way to detect the non execution of the remote function.

https://gist.github.com/1141594

@t8g
t8g commented Aug 12, 2011

Found a way to achieve this :
if (conn.stream.writable)

Is this a good way ?

@joeferner

I've been using

dnode(...).connect(..., function(remote, conn) {
  conn.on('end', function() {
    console.log("server died");
  });
});
@substack substack closed this Mar 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.