New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

under

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

under - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

test/timeout_spec.js

29

lib/proxy.js

@@ -12,5 +12,3 @@ /*

var debug = false,
retry_failed = false;
var debug = false;
var defaults = {};

@@ -103,15 +101,18 @@

exports.setup = function(opts) {
defaults = opts;
exports.setup = function(options) {
defaults = options;
if (opts.max_active || opts.max_sockets)
agent.maxSockets = (opts.max_active || opts.max_sockets);
if (options.max_active || options.max_sockets)
agent.maxSockets = (options.max_active || options.max_sockets);
if (opts.debug)
debug = opts.debug;
if (options.debug)
debug = options.debug;
if (opts.retry_failed)
retry_failed = opts.retry_failed;
return function(req, res) {
var opts = arguments[2] || {};
var cb = arguments[3];
return exports.send;
opts.retry_failed = options.retry_failed;
exports.send(req, res, opts, cb);
};
}

@@ -173,6 +174,6 @@

if (!res.headersSent) {
if (retry_failed === true && !opts.retried) {
if (opts.retry_failed === true) {
// retry is enabled, so wait one second and resend the request
return setTimeout(function() {
opts.retried = true;
opts.retry_failed = false;
exports.send(req, res, opts, cb);

@@ -179,0 +180,0 @@ }, 1000);

{
"name": "under",
"version": "0.1.5",
"version": "0.1.6",
"description": "Fast reverse HTTP proxy with load balancing and queue support.",

@@ -5,0 +5,0 @@ "main": "index.js",

var http = require('http'),
needle = require('needle'),
spawn = require('child_process').spawn,
should = require('should'),

@@ -5,0 +4,0 @@ sinon = require('sinon'),

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc