You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2018/06/04 04:51:51 UTC
[incubator-servicecomb-java-chassis] branch master updated:
[SCB-471]watch mode: netty upgrade have add pong response and need to
handle it
This is an automated email from the ASF dual-hosted git repository.
liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git
The following commit(s) were added to refs/heads/master by this push:
new 272c4e4 [SCB-471]watch mode: netty upgrade have add pong response and need to handle it
272c4e4 is described below
commit 272c4e42586a36c00ff85c54171493540892fcfc
Author: liubao <ba...@huawei.com>
AuthorDate: Mon Jun 4 11:25:50 2018 +0800
[SCB-471]watch mode: netty upgrade have add pong response and need to handle it
---
.../org/apache/servicecomb/config/client/ConfigCenterClient.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java b/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java
index 9941a27..a58de4d 100644
--- a/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java
+++ b/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java
@@ -63,6 +63,7 @@ import io.netty.handler.codec.http.HttpResponseStatus;
import io.vertx.core.DeploymentOptions;
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
+import io.vertx.core.buffer.Buffer;
import io.vertx.core.http.CaseInsensitiveHeaders;
import io.vertx.core.http.HttpClientOptions;
import io.vertx.core.http.HttpClientRequest;
@@ -292,7 +293,12 @@ public class ConfigCenterClient {
stopHeartBeatThread();
isWatching = false;
});
- ws.handler(action -> {
+
+ ws.pongHandler(pong -> {
+ // ignore, just prevent NPE.
+ });
+ ws.frameHandler(frame -> {
+ Buffer action = frame.binaryData();
LOGGER.info("watching config recieved {}", action);
Map<String, Object> mAction = action.toJsonObject().getMap();
if ("CREATE".equals(mAction.get("action"))) {
--
To stop receiving notification emails like this one, please contact
liubao@apache.org.