change the default ping timeout to 3 seconds and make it configurable

This commit is contained in:
Spencer Alger
2015-03-26 12:34:09 -07:00
parent 9a447943a4
commit 307dc44316
4 changed files with 10 additions and 3 deletions

View File

@ -26,7 +26,8 @@ Almost all of the methods on the client accept two arguments:
[source,js]
-----------------
client.ping({
requestTimeout: 1000,
requestTimeout: 30000,
// undocumented params are appended to the query string
hello: "elasticsearch!"
}, function (error) {