Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

How to detect server crash ? #62

Closed
t8g opened this Issue · 2 comments

3 participants

@t8g

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

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