minor: v2.10.0 (update) (#335)

minor: v2.10.0 (update)
This commit is contained in:
Andy Pan 2024-06-18 17:25:25 +08:00 committed by GitHub
commit 1217e3eabe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 20 deletions

View File

@ -201,16 +201,9 @@ func (mp *MultiPool) ReleaseTimeout(timeout time.Duration) error {
_ = wg.Wait() _ = wg.Wait()
var ( var errStr strings.Builder
i int for i := 0; i < len(mp.pools); i++ {
errStr strings.Builder if err := <-errCh; err != nil {
)
for err := range errCh {
i++
if i == len(mp.pools) {
break
}
if err != nil {
errStr.WriteString(err.Error()) errStr.WriteString(err.Error())
errStr.WriteString(" | ") errStr.WriteString(" | ")
} }

View File

@ -191,16 +191,9 @@ func (mp *MultiPoolWithFunc) ReleaseTimeout(timeout time.Duration) error {
_ = wg.Wait() _ = wg.Wait()
var ( var errStr strings.Builder
i int for i := 0; i < len(mp.pools); i++ {
errStr strings.Builder if err := <-errCh; err != nil {
)
for err := range errCh {
i++
if i == len(mp.pools) {
break
}
if err != nil {
errStr.WriteString(err.Error()) errStr.WriteString(err.Error())
errStr.WriteString(" | ") errStr.WriteString(" | ")
} }