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

gohttp

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gohttp - npm Package Compare versions

Comparing version 4.0.5 to 4.1.0-beta

http2proxy.js

27

hiio.js

@@ -350,11 +350,16 @@ 'use strict';

this.keepalive = options.keepalive
this.reconnDelay = options.reconnDelay
this.connected = false
this.init()
}
init() {
init () {
this.session.on('connect', () => {
this.connected = true
})
this.session.on('close', () => {
this.connected = false
if (this.keepalive && typeof this.reconn === 'function') {
if (this.debug) {
console.log('Connect close, reconnect...')
}
this.debug && console.log('Connect closed, reconnect...')
this.reconn()

@@ -367,5 +372,4 @@ } else {

this.session.on('error', err => {
if (this.debug) {
console.error(err)
}
this.debug && console.error(err)
this.connected = false
this.session.destroy()

@@ -715,2 +719,3 @@ })

req.host = ''
req.connected = false
this.pool.push(req)

@@ -724,2 +729,3 @@ }

if (r) {
r.connected = true
r.session = options.session

@@ -792,2 +798,3 @@ r.host = options.host

keepalive : options.keepalive === undefined ? false : true,
reconnDelay : options.reconnDelay === undefined ? 100 : options.reconnDelay
})

@@ -798,4 +805,6 @@

options.sessionRequest = newReq
this.connect(url, options)
newReq.init()
setTimeout(() => {
this.connect(url, options)
newReq.init()
}, newReq.reconnDelay)
}

@@ -802,0 +811,0 @@ }

{
"name": "gohttp",
"version": "4.0.5",
"version": "4.1.0-beta",
"description": "http & https client for HTTP/1.1 and HTTP/2",

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

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