summaryrefslogtreecommitdiffci
path: root/internal
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/router/router.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/router/router.go b/internal/router/router.go
index 14973ad..2b45761 100644
--- a/internal/router/router.go
+++ b/internal/router/router.go
@@ -433,7 +433,12 @@ func (r *Router) Close() (err error) {
}
slog.Debug("closing page cache")
r.supplements.PageCache.Close()
-
+ if r.endpoint.Type == "unix" {
+ slog.Debug("closing unix socket")
+ if err = os.Remove(r.endpoint.Config.(*config.UnixConfig).Path); err != nil {
+ allErrors = append(allErrors, fmt.Errorf("fail to close unix socket: %w", err))
+ }
+ }
return errors.Join(allErrors...)
}