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

net-retry-connect

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

net-retry-connect - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

9

index.js

@@ -17,7 +17,9 @@ var net = require('net');

client.on('error', function(err) {
if(!operation.retry(err)) {
client.on('error', handleError);
function handleError(err) {
if (!operation.retry(err)) {
cb(err, null)
}
});
}

@@ -27,2 +29,3 @@ operation.attempt(function () {

if(!cbCalled) {
client.removeListener('error', handleError);
cb(null, client);

@@ -29,0 +32,0 @@ cbCalled = true;

{
"name": "net-retry-connect",
"version": "0.1.0",
"version": "0.1.1",
"description": "Attempt to connect to net Sockets using retry patterns",

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

@@ -16,5 +16,5 @@ # net-retry-connect

```options``` provides this options:
* port: the TCP port
* host: optional, defaults to ```'localhost'```
* retryOptions, see retry options for [retry.operation](https://github.com/tim-kos/node-retry#retryoperationoptions)
* ```port```: the TCP port
* ```host```: optional, defaults to ```'localhost'```
* ```retryOptions```, optional, see retry options for [retry.operation](https://github.com/tim-kos/node-retry#retryoperationoptions)

@@ -48,3 +48,5 @@ ```callback``` returns a client object if connection has been successful. Otherwise it returns the error.

```npm install```
```npm test```
```
npm install
npm test
```

@@ -30,2 +30,12 @@ var retryConnect = require('../index');

});
it('client should have no listeners attached', function(done) {
setTimeout(function () {
createServer();
}, 3000);
retryConnect.to({port: 3000, host: 'localhost'}, function (error, client) {
assert.equal(client.listeners('error').length, 0);
done();
});
})
});

@@ -32,0 +42,0 @@

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