-
-
Save spalger/658bc44e7790e68f66f0ba08c01a60b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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