This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch 5.x
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/5.x by this push:
     new 27790b9  Fix bug: Agent never update its Instance HeartbeatTime (#3167)
27790b9 is described below

commit 27790b9f6ac22b93c8f4ec3eb34a242882073993
Author: evanxuhe <[email protected]>
AuthorDate: Thu Jul 25 17:42:27 2019 +0800

    Fix bug: Agent never update its Instance HeartbeatTime (#3167)
---
 .../skywalking/apm/agent/core/remote/AppAndServiceRegisterClient.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/AppAndServiceRegisterClient.java
 
b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/AppAndServiceRegisterClient.java
index 666581c..13fa40c 100644
--- 
a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/AppAndServiceRegisterClient.java
+++ 
b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/AppAndServiceRegisterClient.java
@@ -131,7 +131,7 @@ public class AppAndServiceRegisterClient implements 
BootService, GRPCChannelList
                                     = 
instanceMapping.getApplicationInstanceId();
                             }
                         } else {
-                            if (lastSegmentTime - System.currentTimeMillis() > 
60 * 1000) {
+                            if ( System.currentTimeMillis() - lastSegmentTime 
> 60 * 1000) {
                                 
instanceDiscoveryServiceBlockingStub.heartbeat(ApplicationInstanceHeartbeat.newBuilder()
                                     
.setApplicationInstanceId(RemoteDownstreamConfig.Agent.APPLICATION_INSTANCE_ID)
                                     
.setHeartbeatTime(System.currentTimeMillis())

Reply via email to