Start with http2 sessions unrefed in case no streams are ever created

This commit is contained in:
murgatroid99 2019-03-07 15:41:12 -08:00
parent b0f06d56c2
commit 0cf6981eaf
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ export class Http2SubChannel extends EventEmitter implements SubChannel {
userAgent: string, channelArgs: Partial<ChannelOptions>) {
super();
this.session = http2.connect(target, connectionOptions);
this.session.unref();
this.session.on('connect', () => {
this.emit('connect');
});