Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nohost/connect

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nohost/connect - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

15

index.js

@@ -24,3 +24,3 @@ const http = require('http');

if (cb) {
cb(err || CLOSED_ERR);
cb(err);
cb = null;

@@ -30,3 +30,3 @@ }

if (req._hasError) {
return cb && cb(CLOSED_ERR);
return cb && cb();
}

@@ -50,3 +50,3 @@ req.on('error', execCb);

};
const handleError = function(err) {
const handleError = (err) => {
clearTimeout(timer);

@@ -56,3 +56,3 @@ if (done) {

}
err = err || (this === socket ? CLOSED_ERR : TIMEOUT_ERR);
err = err || TIMEOUT_ERR;
if (retry) {

@@ -73,3 +73,3 @@ return execCallback(err);

}
onClose(socket, handleError);
onClose(socket, err => handleError(err || CLOSED_ERR));
};

@@ -130,3 +130,3 @@

_destroy(err);
reject(err);
reject(err || CLOSED_ERR);
});

@@ -191,3 +191,4 @@ });

onClose(reqSock, (e) => socket.destroy(e));
onClose(socket, (e) => reqSock.destroy(e));
// 出错才可以把客户端连接销毁,否则会有问题
onClose(socket, (e) => e && reqSock.destroy(e));
} catch (e) {

@@ -194,0 +195,0 @@ const body = e.stack || e.message || '';

{
"name": "@nohost/connect",
"version": "1.1.1",
"version": "1.2.0",
"description": "处理 Nohost 内部请求转发的模块",

@@ -5,0 +5,0 @@ "scripts": {

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