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

jiashunzhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new d898ccb5 call AfterHCCompleted when WaitAndReset fails
     new 6e63b1f8 Merge pull request #1858 from 
chenBright/fix_after_hc_completed
d898ccb5 is described below

commit d898ccb50361fee6433cddcefe685ad27624915b
Author: chenguangming <[email protected]>
AuthorDate: Tue Jul 26 17:32:37 2022 +0800

    call AfterHCCompleted when WaitAndReset fails
---
 src/brpc/details/health_check.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/brpc/details/health_check.cpp 
b/src/brpc/details/health_check.cpp
index 2800e692..ab838cc8 100644
--- a/src/brpc/details/health_check.cpp
+++ b/src/brpc/details/health_check.cpp
@@ -167,7 +167,7 @@ bool HealthCheckTask::OnTriggeringTask(timespec* 
next_abstime) {
                  << " was abandoned before health checking";
         return false;
     }
-    // Note: Making a Socket re-addessable is hard. An alternative is
+    // Note: Making a Socket re-addressable is hard. An alternative is
     // creating another Socket with selected internal fields to replace
     // failed Socket. Although it avoids concurrent issues with in-place
     // revive, it changes SocketId: many code need to watch SocketId 
@@ -189,6 +189,7 @@ bool HealthCheckTask::OnTriggeringTask(timespec* 
next_abstime) {
         _first_time = false;
         if (ptr->WaitAndReset(2/*note*/) != 0) {
             LOG(INFO) << "Cancel checking " << *ptr;
+            ptr->AfterHCCompleted();
             return false;
         }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to