优化连接管理和日志记录
This commit is contained in:
@@ -35,7 +35,7 @@ func ChanConnAccept(ctx context.Context, ls net.Listener) chan net.Conn {
|
||||
return connCh
|
||||
}
|
||||
|
||||
func ChanWgWait(ctx context.Context, wg *CountWaitGroup) chan struct{} {
|
||||
func ChanWgWait[T WaitGroup](ctx context.Context, wg T) chan struct{} {
|
||||
ch := make(chan struct{})
|
||||
go func() {
|
||||
wg.Wait()
|
||||
|
||||
Reference in New Issue
Block a user