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
+3 -8
View File
@@ -64,9 +64,9 @@ func WithRetryConfig(value transport.RetryConfig) WorkerOption {
}
}
func WithRetryDisabled(value bool) WorkerOption {
func WithRetryDisabled() WorkerOption {
return func(c *WorkerConfig) {
c.RetryDisabled = value
c.RetryDisabled = true
}
}
@@ -224,13 +224,8 @@ func (w *DefaultWorker) runSession(ctx context.Context, pool PoolPlugin) {
}
// setup new connection
conn, err := transport.NewConnection(
conn, _ := transport.NewConnection(
ctx, socket, &w.config.ConnectionConfig, w.handler)
if err != nil {
// TODO: cleanup worker? surface error?
return
}
w.conn.Store(conn)
pool.Events <- PoolEvent{ID: w.url, Kind: EventConnected, At: time.Now()}