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

redis

Package Overview
Dependencies
Maintainers
4
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis - npm Package Compare versions

Comparing version 2.5.0-1 to 2.5.0

.github/ISSUE_TEMPLATE.md

4

changelog.md
Changelog
=========
## v.2.5.0 - 15 Mar, 2015
Same changelog as the pre-release
## v.2.5.0-1 - 07 Mar, 2015

@@ -5,0 +9,0 @@

43

index.js

@@ -37,3 +37,5 @@ 'use strict';

function RedisClient (options) {
// Attention: The second parameter might be removed at will and is not officially supported.
// Do not rely on this
function RedisClient (options, stream) {
// Copy the options so they are not mutated

@@ -44,3 +46,8 @@ options = utils.clone(options);

var self = this;
if (options.path) {
if (stream) {
// The stream from the outside is used so no connection from this side is triggered but from the server this client should talk to
// Reconnect etc won't work with this. This requires monkey patching to work, so it is not officially supported
options.stream = stream;
this.address = '"Private stream"';
} else if (options.path) {
cnx_options.path = options.path;

@@ -179,13 +186,21 @@ this.address = options.path;

// On a reconnect destroy the former stream and retry
if (this.stream) {
this.stream.removeAllListeners();
this.stream.destroy();
}
if (this.options.stream) {
// Only add the listeners once in case of a reconnect try (that won't work)
if (this.stream) {
return;
}
this.stream = this.options.stream;
} else {
// On a reconnect destroy the former stream and retry
if (this.stream) {
this.stream.removeAllListeners();
this.stream.destroy();
}
/* istanbul ignore if: travis does not work with stunnel atm. Therefor the tls tests are skipped on travis */
if (this.options.tls) {
this.stream = tls.connect(this.connection_options);
} else {
this.stream = net.createConnection(this.connection_options);
/* istanbul ignore if: travis does not work with stunnel atm. Therefor the tls tests are skipped on travis */
if (this.options.tls) {
this.stream = tls.connect(this.connection_options);
} else {
this.stream = net.createConnection(this.connection_options);
}
}

@@ -224,4 +239,4 @@

this.stream.once('close', function () {
self.connection_gone('close', new Error('Stream connection closed'));
this.stream.once('close', function (hadError) {
self.connection_gone('close', new Error('Stream connection closed' + (hadError ? ' because of a transmission error' : '')));
});

@@ -228,0 +243,0 @@

{
"name": "redis",
"version": "2.5.0-1",
"version": "2.5.0",
"description": "Redis client library",

@@ -42,3 +42,3 @@ "keywords": [

"mocha": "^2.3.2",
"nyc": "^5.2.0",
"nyc": "^6.0.0",
"optional-dev-dependency": "^1.1.0",

@@ -45,0 +45,0 @@ "tcp-port-used": "^0.1.2",

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