Skip to content

Commit 994e327

Browse files
committed
fix:fix consul heartbeat delay.
1 parent 29d8e30 commit 994e327

File tree

1 file changed

+2
-0
lines changed
  • polaris-plugins/polaris-plugins-connector/connector-consul/src/main/java/com/tencent/polaris/plugins/connector/consul

1 file changed

+2
-0
lines changed

polaris-plugins/polaris-plugins-connector/connector-consul/src/main/java/com/tencent/polaris/plugins/connector/consul/ConsulAPIConnector.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ public CommonProviderResponse registerInstance(CommonProviderRequest req, Map<St
312312
resp.setExists(false);
313313
LOG.info("Registered service to Consul: " + service);
314314
ieRegistered = true;
315+
// heartbeat when registration is successful.
316+
heartbeat(req);
315317
return resp;
316318
} catch (ConsulException e) {
317319
throw new RetriableException(ErrorCode.NETWORK_ERROR,

0 commit comments

Comments
 (0)