Fixes #2312 - HTTP/2 Connection.Listener notified after first request.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
15729928b3
commit
4c24c457de
|
@ -124,15 +124,15 @@ public class HTTP2ClientConnectionFactory implements ClientConnectionFactory
|
|||
{
|
||||
session.frames(null, this, prefaceFrame, settingsFrame);
|
||||
}
|
||||
// Only start reading from server after we have sent the client preface,
|
||||
// otherwise we risk to read the server preface (a SETTINGS frame) and
|
||||
// reply to that before we have the chance to send the client preface.
|
||||
super.onOpen();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void succeeded()
|
||||
{
|
||||
// Only start reading from server after we have sent the client preface,
|
||||
// otherwise we risk to read the server preface (a SETTINGS frame) and
|
||||
// reply to that before we have the chance to send the client preface.
|
||||
super.onOpen();
|
||||
promise.succeeded(getSession());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue