You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux david-Latitude-E6440 5.13.0-22-generic #22-Ubuntu SMP Fri Nov 5 13:21:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
http2
What steps will reproduce the bug?
Run this program:
const{ createServer, connect }=require('http2');constassert=require('assert');createServer().on('stream',function(stream){stream.respond({':status': 200,'Content-Type': 'application/octet-stream'});stream.on('end',()=>{stream.end();stream.session.close();this.close();});stream.resume();}).listen(7000,()=>{connect('http://localhost:7000',function(){this.request({':method': 'POST'},{waitForTrailers: true}).on('response',function(){this.end('12345');this.on('error',err=>assert.equal(err.message,'write after end'));this.write('6');}).on('wantTrailers',function(){this.sendTrailers({});});});});
How often does it reproduce? Is there a required condition?
Every time
What is the expected behavior?
Program should exit
What do you see instead?
Program doesn't exit because server stream doesn't get end event.
Additional information
If you remove the write after end (this.write('6')) then the program exits.
Something is stopping the wantTrailers event being emitted and so the client stream never ends.
Note, changing to waitForTrailers: false also makes it exit (server gets end event).
The text was updated successfully, but these errors were encountered:
Version
v16.13.1
Platform
Linux david-Latitude-E6440 5.13.0-22-generic #22-Ubuntu SMP Fri Nov 5 13:21:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
http2
What steps will reproduce the bug?
Run this program:
How often does it reproduce? Is there a required condition?
Every time
What is the expected behavior?
Program should exit
What do you see instead?
Program doesn't exit because server stream doesn't get
end
event.Additional information
If you remove the write after end (
this.write('6')
) then the program exits.Something is stopping the
wantTrailers
event being emitted and so the client stream never ends.Note, changing to
waitForTrailers: false
also makes it exit (server getsend
event).The text was updated successfully, but these errors were encountered: