Skip to content

Commit

Permalink
failure count check
Browse files Browse the repository at this point in the history
  • Loading branch information
joyc-bq committed Jan 24, 2025
1 parent f0284f5 commit 8de70de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/lib/plugins/efm/monitor_connection_context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class MonitorConnectionContext {

const invalidHostDurationNano: number = statusCheckEndNano - this.invalidHostStartTimeNano;
const maxInvalidHostDurationMillis: number = this.failureDetectionIntervalMillis * Math.max(0, this.failureDetectionCount);
if (invalidHostDurationNano >= maxInvalidHostDurationMillis * 1_000_000) {
if (this.failureCount >= this.failureDetectionCount || invalidHostDurationNano >= maxInvalidHostDurationMillis * 1_000_000) {
logger.debug(Messages.get("MonitorConnectionContext.hostDead", hostName));
this.isHostUnhealthy = true;
await this.abortConnection();
Expand Down

0 comments on commit 8de70de

Please sign in to comment.