fix: ensure unix socket shutdown doesn't run twice

This commit is contained in:
Stavros
2026-05-10 16:03:39 +03:00
parent e739aa8fd0
commit 11b6155b9e
2 changed files with 106 additions and 2 deletions
+1 -2
View File
@@ -356,8 +356,6 @@ func (app *BootstrapApp) serveUnix() error {
os.Remove(app.config.Server.SocketPath)
}
defer shutdown()
go func() {
<-app.ctx.Done()
app.log.App.Debug().Msg("Shutting down unix socket listener")
@@ -367,6 +365,7 @@ func (app *BootstrapApp) serveUnix() error {
err = server.Serve(listener)
if err != nil && !errors.Is(err, http.ErrServerClosed) {
shutdown()
return fmt.Errorf("failed to start unix socket listener: %w", err)
}
+105
View File
File diff suppressed because one or more lines are too long