优化连接管理和日志记录

This commit is contained in:
2025-02-27 23:11:36 +08:00
parent 38d5341e84
commit 037c2c53c6
11 changed files with 436 additions and 403 deletions

View File

@@ -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()