Skip to content
This repository has been archived by the owner on Oct 13, 2024. It is now read-only.

Commit

Permalink
SCB-1264 fix lost consul metadata, such as 'secure=false'
Browse files Browse the repository at this point in the history
fix when server.port=0, health check fail and also fix lose consul metadata, such as 'secure=false' (#454)
  • Loading branch information
fengbaicanhe authored and WillemJiang committed Apr 22, 2019
1 parent f4a7af6 commit 5a9d406
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ public void listenInstanceRegisteredEvent(InstanceRegisteredEvent instanceRegist
NewService newservice = new NewService();
newservice.setName(service.getServiceName());
newservice.setId(service.getServiceId());
List<String> tags = consulDiscoveryProperties.getTags();
newservice.setAddress(service.getAddress());
newservice.setPort(service.getServicePort());
List<String> tags = service.getServiceTags();
tags.remove("alpha-server-port=0");
tags.add("alpha-server-port="+actualAlphaServerPort);
newservice.setTags(tags);
Expand Down

0 comments on commit 5a9d406

Please sign in to comment.