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

node-nats-streaming

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-nats-streaming - npm Package Compare versions

Comparing version 0.0.12 to 0.0.14

4

examples/stan-pub.js

@@ -39,2 +39,6 @@ #!/usr/bin/env node

stan.on('error', function(reason) {
console.log(reason);
});
function start() {

@@ -41,0 +45,0 @@ stan.publish(subject, body, function(err, guid){

@@ -41,2 +41,6 @@ #!/usr/bin/env node

stan.on('error', function(reason) {
console.log(reason);
});
function start() {

@@ -43,0 +47,0 @@ var opts = stan.subscriptionOptions();

@@ -41,2 +41,6 @@ #!/usr/bin/env node

stan.on('error', function(reason) {
console.log(reason);
});
function start() {

@@ -43,0 +47,0 @@ var opts = stan.subscriptionOptions();

@@ -24,3 +24,3 @@ /*!

*/
var VERSION = '0.0.12',
var VERSION = '0.0.14',
DEFAULT_PORT = 4222,

@@ -257,2 +257,15 @@ DEFAULT_PRE = 'nats://localhost:',

var cr = proto.ConnectResponse.deserializeBinary(new Buffer(msg, 'binary').toByteArray());
if (cr.getError() !== "") {
// connect failed
that.emit("error", cr.getError());
var nc = that.nc;
delete that.nc;
nc.flush(function(){
if (that.ncOwned) {
nc.close();
that.emit('close');
}
});
return;
}
that.pubPrefix = cr.getPubPrefix();

@@ -259,0 +272,0 @@ that.subRequests = cr.getSubRequests();

2

package.json
{
"name": "node-nats-streaming",
"version": "0.0.12",
"version": "0.0.14",
"description": "Node.js client for NATS Streaming, a lightweight, high-performance cloud native messaging system",

@@ -5,0 +5,0 @@ "keywords": [

@@ -130,2 +130,23 @@ /* jshint node: true */

it('duplicate client id should fire error', function (done) {
var wantTwo = 2;
var id = nuid.next();
var stan = STAN.connect(cluster, id, PORT);
stan.on('connect', function () {
var stan2 = STAN.connect(cluster, id, PORT);
stan2.on('error', function() {
wantTwo--;
if (wantTwo === 0) {
done();
}
});
stan2.on('close', function() {
wantTwo--;
if (wantTwo === 0) {
done();
}
});
});
});
it('should include the correct message in the callback', function (done) {

@@ -132,0 +153,0 @@ var stan = STAN.connect(cluster, nuid.next(), PORT);

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