From c0e821698b6ef0cecee7a4123285ec9cb927af6a Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 6 Jun 2014 08:09:36 -0700 Subject: [PATCH] parser: never return user data --- lib/spdy/protocol/parser.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/spdy/protocol/parser.js b/lib/spdy/protocol/parser.js index f26df4c..b121d88 100644 --- a/lib/spdy/protocol/parser.js +++ b/lib/spdy/protocol/parser.js @@ -84,7 +84,10 @@ Parser.prototype._write = function write(data, encoding, cb) { } // We shall not do anything until we get all expected data - if (this.buffered < this.waiting) return cb(); + if (this.buffered < this.waiting) { + cb(); + return; + } var self = this, buffer = new Buffer(this.waiting),