Skip to content

Instantly share code, notes, and snippets.

@rrva
Created April 11, 2016 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rrva/ca8809d3dad61f164130de1ea50fd140 to your computer and use it in GitHub Desktop.
Save rrva/ca8809d3dad61f164130de1ea50fd140 to your computer and use it in GitHub Desktop.
function connectionStatusReceived(status) {
if(status !== true) {
console.log("Ping got error", error);
setTimeout(function() {
esClient.ping().then(connectionStatusReceived,
connectionStatusReceived);
}, 3000);
}
else {
console.log("Ping got success");
}
};
esClient.ping().then(connectionStatusReceived,
connectionStatusReceived);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment