Chore: Merge branch 'ogn-dev' into with-tun

This commit is contained in:
yaling888
2022-03-16 20:16:30 +08:00
74 changed files with 675 additions and 281 deletions

View File

@ -71,12 +71,12 @@ func (pc *PoolConn) Close() error {
func NewPool(factory func(context.Context) (*Snell, error)) *Pool {
p := pool.New(
func(ctx context.Context) (interface{}, error) {
func(ctx context.Context) (any, error) {
return factory(ctx)
},
pool.WithAge(15000),
pool.WithSize(10),
pool.WithEvict(func(item interface{}) {
pool.WithEvict(func(item any) {
item.(*Snell).Close()
}),
)