documentdb
Advanced tools
Comparing version 1.5.1 to 1.5.2
@@ -0,1 +1,5 @@ | ||
## Changes in 1.5.2 : ## | ||
- Fix memory leak. | ||
## Changes in 1.5.1 : ## | ||
@@ -2,0 +6,0 @@ |
@@ -149,3 +149,3 @@ /* | ||
UserAgent: "documentdb-nodejs-sdk-1.5.1", | ||
UserAgent: "documentdb-nodejs-sdk-1.5.2", | ||
@@ -152,0 +152,0 @@ DefaultPrecisions: { |
@@ -53,2 +53,6 @@ /* | ||
function createRequestObject(connectionPolicy, requestOptions, callback){ | ||
function onTimeout() { | ||
httpsRequest.abort(); | ||
} | ||
var isMedia = ( requestOptions.path.indexOf("media") > -1 ); | ||
@@ -89,3 +93,3 @@ | ||
httpsRequest.on("socket", function(socket) { | ||
httpsRequest.once("socket", function(socket) { | ||
if (isMedia) { | ||
@@ -97,8 +101,10 @@ socket.setTimeout(connectionPolicy.MediaRequestTimeout); | ||
socket.on("timeout", function() { | ||
httpsRequest.abort(); | ||
socket.once("timeout", onTimeout); | ||
httpsRequest.once("response", function () { | ||
socket.removeListener("timeout", onTimeout); | ||
}); | ||
}); | ||
httpsRequest.on("error", callback); | ||
httpsRequest.once("error", callback); | ||
return httpsRequest; | ||
@@ -105,0 +111,0 @@ } |
@@ -12,3 +12,3 @@ { | ||
], | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"author": "Microsoft Corporation", | ||
@@ -15,0 +15,0 @@ "main": "./index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3582313
31
7506