Skip to content

Commit

Permalink
Merge pull request #7 from DoNewsCode/Reasno-patch-1
Browse files Browse the repository at this point in the history
The original default shutdown event is tightly coupled to HTTP and gRPC servers. If one of any servers is missing, goroutines will be leaked. This PR removes the
default shutdown events. These events can be added by using the WithShutdownEvents option.

BREAKING CHANGE
  • Loading branch information
Reasno authored Dec 21, 2021
2 parents 6aae637 + 8519dfe commit dd1a0ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import (
"sync"
"time"

"github.com/DoNewsCode/core"
"github.com/DoNewsCode/core/contract"
"github.com/DoNewsCode/core/events"
"github.com/oklog/run"
Expand All @@ -66,7 +65,7 @@ func NewPool(options ...ProviderOptionFunc) func(contract.Dispatcher) *Pool {
concurrency: 10,
timeout: 10 * time.Second,
dispatcher: dispatcher,
shutdownEvents: []interface{}{core.OnHTTPServerShutdown, core.OnGRPCServerShutdown},
shutdownEvents: []interface{}{},
}
for _, f := range options {
f(&pool)
Expand Down

0 comments on commit dd1a0ab

Please sign in to comment.