File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,10 @@ if (cluster.isMaster) {
148
148
}
149
149
150
150
function createClient ( uri ) {
151
+ if ( ! / \w + : \/ \/ / . test ( uri ) ) {
152
+ uri = 'http://' + uri ;
153
+ }
154
+
151
155
var uri = uri . lastIndexOf ( '/' ) === uri . length - 1 ? uri . substr ( 0 , uri . length - 1 ) : uri ;
152
156
tokens = uri . split ( '/' ) ;
153
157
var res = { } ;
@@ -159,7 +163,9 @@ if (cluster.isMaster) {
159
163
var config = {
160
164
requestTimeout : cli . request_timeout ,
161
165
apiVersion : cli . api_ver ,
162
- suggestCompression : cli . compress
166
+ suggestCompression : cli . compress ,
167
+ sniffOnStart : true ,
168
+ sniffOnConnectionFault : true
163
169
} ;
164
170
165
171
if ( cli . access_key && cli . secret_key && cli . region && / \. a m a z o n a w s \. / . test ( uri ) ) {
@@ -222,7 +228,7 @@ if (cluster.isMaster) {
222
228
if ( err ) {
223
229
logger . fatal ( err ) ;
224
230
if ( err . message . indexOf ( 'parse' ) > - 1 ) {
225
- throw new Error ( "Scroll body parsing error, query_size param is possiblly too high." ) ;
231
+ throw new Error ( "Scroll body parsing error, query_size param is possibly too high." ) ;
226
232
} else {
227
233
throw new Error ( "Scroll error: " + err ) ;
228
234
}
You can’t perform that action at this time.
0 commit comments