From 4c24c457de6720266303d8c00de07dd04e91f209 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Sat, 10 Mar 2018 15:05:02 +0100 Subject: [PATCH] Fixes #2312 - HTTP/2 Connection.Listener notified after first request. Signed-off-by: Simone Bordet --- .../jetty/http2/client/HTTP2ClientConnectionFactory.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jetty-http2/http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2ClientConnectionFactory.java b/jetty-http2/http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2ClientConnectionFactory.java index 8d48028f9da..64df651c950 100644 --- a/jetty-http2/http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2ClientConnectionFactory.java +++ b/jetty-http2/http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2ClientConnectionFactory.java @@ -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()); }