Skip to content

Commit

Permalink
[SCB-1638]servicecenter do not handle websocket PING/PONG message (#1450
Browse files Browse the repository at this point in the history
)
  • Loading branch information
liubao68 committed Dec 10, 2019
1 parent ef6895e commit fbf7cae
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ servicecomb:
interval: 3
pull:
interval: 90
watch: false
watch: true
autodiscovery: true
# can download config center from https://cse-bucket.obs.myhwclouds.com/LocalCSE/Local-CSE-1.0.0.zip to test dynamic config
config:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ servicecomb:
interval: 3
pull:
interval: 10
watch: false
watch: true
autodiscovery: true
# can download config center from https://cse-bucket.obs.myhwclouds.com/LocalCSE/Local-CSE-1.0.0.zip to test dynamic config
config:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -695,9 +695,9 @@ public void watch(String selfMicroserviceId, AsyncResultCallback<MicroserviceIns
response = JsonUtils.readValue(bodyBuffer.getBytes(),
MicroserviceInstanceChangedEvent.class);
} catch (Exception e) {
LOGGER.error("watcher handle microservice {} response failed, {}",
LOGGER.error("watcher handle microservice {} response failed.",
selfMicroserviceId,
bodyBuffer.toString());
e);
return;
}
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ public static void open(IpPort ipPort, String url, Handler<Void> onOpen, Handler
asyncResult.result().closeHandler(v -> {
onClose.handle(v);
});
asyncResult.result().handler(onMessage);
asyncResult.result().pongHandler(pong -> {
// ignore, just prevent NPE.
});
asyncResult.result().frameHandler((frame) -> onMessage.handle(frame.binaryData()));
}
});
});
Expand Down

0 comments on commit fbf7cae

Please sign in to comment.