Skip to content

Commit

Permalink
use requestTimeout setting for health check
Browse files Browse the repository at this point in the history
Fixes #6377
  • Loading branch information
w33ble committed Mar 2, 2016
1 parent 0dc2b33 commit 7f4b548
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/elasticsearch/lib/health_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function (plugin, server) {
plugin.status.yellow('Waiting for Elasticsearch');

function waitForPong() {
return client.ping({ requestTimeout: 1500 }).catch(function (err) {
return client.ping({ requestTimeout: config.get('elasticsearch.requestTimeout') }).catch(function (err) {
if (!(err instanceof NoConnections)) throw err;

plugin.status.red(format('Unable to connect to Elasticsearch at %s.', config.get('elasticsearch.url')));
Expand Down

0 comments on commit 7f4b548

Please sign in to comment.