Skip to content

Commit

Permalink
minor: v2.10.0 (update) (#335)
Browse files Browse the repository at this point in the history
minor: v2.10.0 (update)
  • Loading branch information
panjf2000 authored Jun 18, 2024
2 parents 5dfe043 + 313f136 commit 1217e3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
13 changes: 3 additions & 10 deletions multipool.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,9 @@ func (mp *MultiPool) ReleaseTimeout(timeout time.Duration) error {

_ = wg.Wait()

var (
i int
errStr strings.Builder
)
for err := range errCh {
i++
if i == len(mp.pools) {
break
}
if err != nil {
var errStr strings.Builder
for i := 0; i < len(mp.pools); i++ {
if err := <-errCh; err != nil {
errStr.WriteString(err.Error())
errStr.WriteString(" | ")
}
Expand Down
13 changes: 3 additions & 10 deletions multipool_func.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,9 @@ func (mp *MultiPoolWithFunc) ReleaseTimeout(timeout time.Duration) error {

_ = wg.Wait()

var (
i int
errStr strings.Builder
)
for err := range errCh {
i++
if i == len(mp.pools) {
break
}
if err != nil {
var errStr strings.Builder
for i := 0; i < len(mp.pools); i++ {
if err := <-errCh; err != nil {
errStr.WriteString(err.Error())
errStr.WriteString(" | ")
}
Expand Down

0 comments on commit 1217e3e

Please sign in to comment.