Skip to content

Commit 5f759a8

Browse files
authored
fix: reset tunnel pool errors during health check and common processing
1 parent 6356bfa commit 5f759a8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/common.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ func (c *Common) healthCheck() error {
374374
return err
375375
}
376376
c.tunnelPool.Flush()
377+
c.tunnelPool.ResetError()
377378
time.Sleep(reportInterval) // 等待连接池刷新完成
378379
c.logger.Debug("Tunnel pool reset: %v active connections", c.tunnelPool.Active())
379380
}
@@ -630,6 +631,7 @@ func (c *Common) commonOnce() error {
630631
case "0": // 连接池刷新
631632
go func() {
632633
c.tunnelPool.Flush()
634+
c.tunnelPool.ResetError()
633635
time.Sleep(reportInterval) // 等待连接池刷新完成
634636
c.logger.Debug("Tunnel pool reset: %v active connections", c.tunnelPool.Active())
635637
}()

0 commit comments

Comments
 (0)