File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ impl DriaComputeNode {
24
24
rpc_liveness_refresh_interval. tick ( ) . await ; // move each one tick
25
25
26
26
let mut heartbeat_interval = tokio:: time:: interval ( HEARTBEAT_INTERVAL_SECS ) ;
27
+ // move one tick, and wait at least a third of the diagnostics
28
+ heartbeat_interval. tick ( ) . await ;
29
+ heartbeat_interval. reset_after ( DIAGNOSTIC_REFRESH_INTERVAL_SECS / 3 ) ;
27
30
28
31
loop {
29
32
tokio:: select! {
@@ -55,6 +58,7 @@ impl DriaComputeNode {
55
58
// check RPC, and get a new one if we are disconnected
56
59
_ = rpc_liveness_refresh_interval. tick( ) => self . handle_rpc_liveness_check( ) . await ,
57
60
61
+ // send a heartbeat request to publish liveness info
58
62
_ = heartbeat_interval. tick( ) => {
59
63
if let Err ( e) = self . send_heartbeat( ) . await {
60
64
log:: error!( "Error making heartbeat: {:?}" , e) ;
You can’t perform that action at this time.
0 commit comments