mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-10 10:53:36 +02:00
refactor(entrypoint): move route registry into entrypoint context (#200)
- Introduced `NewTestRoute` function to simplify route creation in benchmark tests. - Replaced direct route validation and starting with error handling using `require.NoError`. - Updated server retrieval to use `common.ProxyHTTPAddr` for consistency. - Improved logging for HTTP route addition errors in `AddRoute` method. * fix(tcp): wrap proxy proto listener before acl * refactor(entrypoint): propagate errors from route registration and stream serving * fix(docs): correct swagger and package README
This commit is contained in:
@@ -158,10 +158,15 @@ Tips:
|
||||
},
|
||||
ErrorLog: stdlog.New(&errLog, "", 0),
|
||||
}
|
||||
srv.Serve(l)
|
||||
go func() {
|
||||
err := srv.Serve(l)
|
||||
if err != nil && !errors.Is(err, http.ErrServerClosed) {
|
||||
log.Error().Err(err).Msg("socket proxy server stopped with error")
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
systeminfo.Poller.Start()
|
||||
systeminfo.Poller.Start(t)
|
||||
|
||||
task.WaitExit(3)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user