Skip to content

Commit dd1a0ab

Browse files
authored
Merge pull request #7 from DoNewsCode/Reasno-patch-1
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
2 parents 6aae637 + 8519dfe commit dd1a0ab

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pool.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ import (
4747
"sync"
4848
"time"
4949

50-
"github.com/DoNewsCode/core"
5150
"github.com/DoNewsCode/core/contract"
5251
"github.com/DoNewsCode/core/events"
5352
"github.com/oklog/run"
@@ -66,7 +65,7 @@ func NewPool(options ...ProviderOptionFunc) func(contract.Dispatcher) *Pool {
6665
concurrency: 10,
6766
timeout: 10 * time.Second,
6867
dispatcher: dispatcher,
69-
shutdownEvents: []interface{}{core.OnHTTPServerShutdown, core.OnGRPCServerShutdown},
68+
shutdownEvents: []interface{}{},
7069
}
7170
for _, f := range options {
7271
f(&pool)

0 commit comments

Comments
 (0)