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

spdy

Package Overview
Dependencies
Maintainers
2
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spdy - npm Package Compare versions

Comparing version 1.26.4 to 1.26.5

41

lib/spdy/protocol/parser.js

@@ -25,3 +25,2 @@ var parser = exports;

this.drained = true;
this.paused = false;

@@ -84,2 +83,3 @@ this.buffer = [];

this.needDrain = true;
cb();
return false;

@@ -89,4 +89,13 @@ }

// We shall not do anything until we get all expected data
if (this.buffered < this.waiting) return cb();
if (this.buffered < this.waiting) {
if (this.needDrain) {
// Mark parser as drained
this.needDrain = false;
this.emit('drain');
}
cb();
return;
}
var self = this,

@@ -139,28 +148,12 @@ buffer = new Buffer(this.waiting),

if (self.waiting <= self.buffered) {
if (sync) {
utils.nextTick(function() {
// Unpause right before entering new `_write()` call
self.paused = false;
self._write(undefined, null, cb);
});
} else {
if (sync) {
utils.nextTick(function() {
// Unpause right before entering new `_write()` call
self.paused = false;
self._write(undefined, null, cb);
}
});
} else {
utils.nextTick(function() {
// Unpause only before emitting `drain`
self.paused = false;
if (!self.needDrain)
return cb();
// Mark parser as drained
self.needDrain = false;
self.emit('drain');
cb();
});
// Unpause right before entering new `_write()` call
self.paused = false;
self._write(undefined, null, cb);
}

@@ -167,0 +160,0 @@ });

@@ -96,3 +96,3 @@ var spdy = require('../spdy');

}
if (this.connection._spdyState.parser.drained) {
if (!this.connection._spdyState.parser.needDrain) {
utils.nextTick(this._tickListener);

@@ -99,0 +99,0 @@ } else {

{
"name": "spdy",
"version": "1.26.4",
"version": "1.26.5",
"description": "Implementation of the SPDY protocol on node.js.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -326,3 +326,3 @@ var assert = require('assert'),

pair.server.req.socket.setTimeout(500);
pair.server.req.socket.setTimeout(300);
pair.client.req.on('error', function() {

@@ -337,3 +337,3 @@ done();

pair.server.req.socket.setTimeout(300);
pair.server.req.socket.setTimeout(150);
setTimeout(function() {

@@ -343,4 +343,4 @@ pair.server.res.write('ok1');

pair.server.res.write('ok2');
}, 250);
}, 250);
}, 100);
}, 100);

@@ -347,0 +347,0 @@ pair.client.res.on('data', function(chunk) {

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