Remove unneeded goroutine spawn in connection pool destructor
fixes #708
This commit is contained in:
+3
-5
@@ -171,11 +171,9 @@ func ConnectConfig(ctx context.Context, config *Config) (*Pool, error) {
|
||||
return cr, nil
|
||||
},
|
||||
func(value interface{}) {
|
||||
go func() {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
value.(*connResource).conn.Close(ctx)
|
||||
cancel()
|
||||
}()
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
value.(*connResource).conn.Close(ctx)
|
||||
cancel()
|
||||
},
|
||||
config.MaxConns,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user