refactor: phase 3 integrated new dialing pattern into pool

This commit is contained in:
Jay
2026-06-06 18:32:52 -04:00
parent a46e9f7ad8
commit 1977fb385a
5 changed files with 85 additions and 75 deletions
+10 -2
View File
@@ -85,14 +85,22 @@ func DialWithRetry(
for {
if logger != nil {
logger.Debug("dialing", "attempt", mgr.RetryCount()+1)
if mgr == nil {
logger.Debug("dialing")
} else {
logger.Debug("dialing", "attempt", mgr.RetryCount()+1)
}
}
// dial
socket, err := dialFn(ctx)
if err == nil {
if logger != nil {
logger.Debug("dial successful", "attempt", mgr.RetryCount()+1)
if mgr == nil {
logger.Debug("dial successful")
} else {
logger.Debug("dial successful", "attempt", mgr.RetryCount()+1)
}
}
return socket, nil
}