Skip to content

Instantly share code, notes, and snippets.

@spalger
spalger / eswait.js
Last active April 11, 2016 21:19 — forked from rrva/eswait.js
(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);
}
})
}());