Skip to content

Instantly share code, notes, and snippets.

@spalger
Forked from rrva/eswait.js
Last active April 11, 2016 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spalger/658bc44e7790e68f66f0ba08c01a60b9 to your computer and use it in GitHub Desktop.
Save spalger/658bc44e7790e68f66f0ba08c01a60b9 to your computer and use it in GitHub Desktop.
(function checkForConnection() {
esClient.ping(function (err, pong) {
if (pong) {
console.log("Ping got pong!");
} else {
console.log("Ping did not get pong, trying again in 3sec.");
setTimeout(checkForConnection, 3000);
}
})
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment