Comparing version 1.1.5 to 1.1.6
11
index.js
@@ -334,2 +334,3 @@ 'use strict'; | ||
req.on('response', this.handle_response.bind(this)); | ||
req.on('socket', this.handle_timeout.bind(this)); | ||
req.on('error', this.handle_error.bind(this)); | ||
@@ -439,2 +440,12 @@ | ||
handle_timeout (socket) { | ||
socket.setTimeout(1000 * 30); | ||
socket.on('timeout', () => { | ||
this.request.abort(); | ||
}); | ||
} | ||
handle_error (err) { | ||
@@ -441,0 +452,0 @@ |
{ | ||
"name": "cuddle", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Cuddle is a minimal, chainable and readability first http client", | ||
@@ -5,0 +5,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
16059
365