This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 96bf00f fix issue with protocol version not being correct (#2444)
96bf00f is described below
commit 96bf00fa12bf74db57d36f40989e233752288351
Author: Boyang Jerry Peng <jerry.boyang.peng@gmail.com>
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 6a8ab74..b2d9478 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
@@ -232,8 +232,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;
}
|