File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ func (opt *ClusterOptions) init() {
91
91
}
92
92
93
93
if opt .PoolSize == 0 {
94
- opt .PoolSize = 5 * runtime .NumCPU ( )
94
+ opt .PoolSize = 5 * runtime .GOMAXPROCS ( 0 )
95
95
}
96
96
97
97
switch opt .ReadTimeout {
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ type Options struct {
77
77
WriteTimeout time.Duration
78
78
79
79
// Maximum number of socket connections.
80
- // Default is 10 connections per every CPU as reported by runtime.NumCPU .
80
+ // Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS .
81
81
PoolSize int
82
82
// Minimum number of idle connections which is useful when establishing
83
83
// new connection is slow.
@@ -136,7 +136,7 @@ func (opt *Options) init() {
136
136
}
137
137
}
138
138
if opt .PoolSize == 0 {
139
- opt .PoolSize = 10 * runtime .NumCPU ( )
139
+ opt .PoolSize = 10 * runtime .GOMAXPROCS ( 0 )
140
140
}
141
141
switch opt .ReadTimeout {
142
142
case - 1 :
You can’t perform that action at this time.
0 commit comments