config: flatten WorkerConfig to value type in PoolConfig
This commit is contained in:
@@ -101,7 +101,8 @@ func NewPool(ctx context.Context, config *PoolConfig, handler slog.Handler,
|
||||
if config.WorkerFactory == nil {
|
||||
config.WorkerFactory = func(
|
||||
ctx context.Context, id string, handler slog.Handler) (Worker, error) {
|
||||
return NewWorker(ctx, id, config.WorkerConfig, handler)
|
||||
wc := config.WorkerConfig
|
||||
return NewWorker(ctx, id, &wc, handler)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user