Open dinfyru opened 7 years ago
Getting the same issue: Node v6.7.0 http2@3.3.6
assert.js:85
throw new assert.AssertionError({
^
AssertionError: false == true
at Connection._send (/Users/dchen/Workbench/poc.http2-client-server/node_modules/http2/lib/protocol/connection.js:326:9)
at runCallback (timers.js:574:20)
at tryOnImmediate (timers.js:554:5)
at processImmediate [as _immediateCallback] (timers.js:533:5)
My server:
const server = http2.createServer({
key: fs.readFileSync(path.join(__dirname, '/server.key')),
cert: fs.readFileSync(path.join(__dirname, '/server.crt')),
}, onRequest);
My client:
const options = {
hostname: config.get("http2.hostname"),
port: config.get("http2.port"),
path: '/twolargeframes',
method: 'GET',
key: fs.readFileSync('./server.key'),
ca: fs.readFileSync('./server.crt'),
};
http2.request(options)
Getting this as well with node-apn:
Node version: 6.9.1
AssertionError: false == true
at Connection._send (.../node_modules/http2/lib/protocol/connection.js:343:9)
+1
+1
+1
+1
+1
@molnarg Pls.
+1
+1
+1
+1
@nwgh Also have seen this assert when running node-http2
with node-apn
: https://github.com/molnarg/node-http2/blob/master/lib/protocol/connection.js#L326
Looking at the call to this.push
where moreNeeded
is set, I'm not sure that the assert makes sense as written:
var moreNeeded = this.push(frame);
Here's the code for push
: https://github.com/molnarg/node-http2/blob/master/lib/protocol/flow.js#L277
In the case where this._push(frame)
returns null
(i.e., the frame is too large for the window and split or the window size is <=0), moreNeeded
will be set to null
. Then this._queue.push(frame)
is called, but moreNeeded
is still null
. Thus, any time the window is <=0 or the frame is split we'll hit this assert.
var moreNeeded = null;
if (this._queue.length === 0) {
moreNeeded = this._push(frame);
}
if (moreNeeded === null) {
this._queue.push(frame);
}
return moreNeeded;
+1
+1
+1
+1
+1
same problem.
node -v 6.9.2 http2@3.3.6
My server.js
and boot.js (clustering) - http://pastebin.com/YzGsJVUk