This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new d4b214c fix issue with protocol version not being correct (#2444)
d4b214c is described below
commit d4b214cc0f5266b0fd38c016af1e611d98bad3ed
Author: Boyang Jerry Peng <[email protected]>
AuthorDate: Fri Aug 24 22:40:58 2018 -0700
fix issue with protocol version not being correct (#2444)
---
.../src/main/java/org/apache/pulsar/client/impl/ClientCnx.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
index 02443cc..7287194 100644
--- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
+++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
@@ -243,8 +243,9 @@ public class ClientCnx extends PulsarHandler {
if (log.isDebugEnabled()) {
log.debug("{} Connection is ready", ctx.channel());
}
- connectionFuture.complete(null);
+ // set remote protocol version to the correct version before we
complete the connection future
remoteEndpointProtocolVersion = connected.getProtocolVersion();
+ connectionFuture.complete(null);
state = State.Ready;
}