Fixes #2312 - HTTP/2 Connection.Listener notified after first request.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2018-03-10 15:05:02 +01:00
parent 15729928b3
commit 4c24c457de
1 changed files with 4 additions and 4 deletions

View File

@ -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());
}