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
http2.connect accepts a callback that is invoked when the Http2Session is in a connected state by adding the callback as a listener to the Http2Sessionconnect event here:
However, when one provides the createConnection option and the provided function returns a Socket that is already connected to a remote host, the Http2Session constructor will synchronously raise the connect event, causing the http2.connect listener to not be fired:
The following two changes could resolve the issue:
Expose an Http2Session#connecting property, just like Socket#connecting so the connection state of the Http2Session can be inspected after the constructor has returned
Modify http2.connect to check session.connecting to choose between invoking listener immediately or adding it as a listener to the session's connect event.
The text was updated successfully, but these errors were encountered:
http2.connect
accepts a callback that is invoked when theHttp2Session
is in a connected state by adding the callback as a listener to theHttp2Session
connect
event here:node/lib/internal/http2/core.js
Line 2700 in e37effe
However, when one provides the
createConnection
option and the provided function returns aSocket
that is already connected to a remote host, theHttp2Session
constructor will synchronously raise theconnect
event, causing thehttp2.connect
listener to not be fired:node/lib/internal/http2/core.js
Line 909 in e37effe
The following two changes could resolve the issue:
Http2Session#connecting
property, just likeSocket#connecting
so the connection state of theHttp2Session
can be inspected after the constructor has returnedhttp2.connect
to checksession.connecting
to choose between invokinglistener
immediately or adding it as a listener to the session'sconnect
event.The text was updated successfully, but these errors were encountered: