优化连接效率

This commit is contained in:
2025-03-07 15:50:57 +08:00
parent 791f20d2d7
commit 053041ae34
13 changed files with 564 additions and 418 deletions

View File

@@ -77,8 +77,9 @@ func (s *Server) Run() error {
}
}()
errCh := make(chan error)
errCh := make(chan error, 1)
go func() {
defer close(errCh)
err = m.Serve()
if err != nil {
err = errors.Wrap(err, "dispatcher serve error")