From c81e601550264dc1f99591200ed2727dba12b425 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Mon, 30 Jan 2017 21:57:33 -0800 Subject: [PATCH] add default for pool --- README.md | 5 +++++ lib/bing.js | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index da72e24..de9806e 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,11 @@ Available Options: * preContextText:\<*String*\> * postContextText:\<*String*\> +### request() options + +* maxSockets: integer (default: Infinity) +* reqTimeout: ms + #### Specify Market Getting spanish results: ```js diff --git a/lib/bing.js b/lib/bing.js index a9f322d..2ef69bf 100644 --- a/lib/bing.js +++ b/lib/bing.js @@ -84,7 +84,10 @@ var Bing = function (options) { "User-Agent": opts.userAgent, "Ocp-Apim-Subscription-Key": opts.accKey }, - timeout: opts.reqTimeout + timeout: opts.reqTimeout, + pool: { + maxSockets: opts.maxSockets || Infinity + } }, function (err, res, body) {