zeripath
zeripath
Heya @jolheiser how about doing this? ```patch From 50ca7b0882b7c1beadb158f5fa6718db266dad58 Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Tue, 26 Jul 2022 19:37:22 +0100 Subject: [PATCH] Upgrade to Chroma 2.2.0...
Here's the actual code: https://github.com/go-gitea/gitea/blob/dc8036dcc680abab52b342d18181a5ee42f40318/modules/util/util.go#L68-L102 It just rips out all `\r\n` and `\r` replacing them with `\n` - so if for some perverse reason you actually intend there to be...
If you would prefer it replacing in place - then remove the definition of `tmp` and replace all references to `tmp` with `input` or vice versa. That would do it.
I guess the question is if Gitea ever creates these sockets? If it does then we need to unlink them across graceful-restarts. So is there a way of detecting that...
Yup and outside of Systemd gitea will create the socket for itself: ```go // make a fresh listener if err := util.Remove(address.Name); err != nil && !os.IsNotExist(err) { return nil,...
Why is it a bad idea?
How else do you communicate across restarts? It's completely consistent with the use of `LISTEN_FDS`. How else do you propose that we communicate this information?
Like many other things, Gitea uses the LISTEN_FDS environment variable to pass sockets across graceful restarts - it does this for ease of use and to keep the code common...
Read: https://github.com/go-gitea/gitea/blob/3bd8f50af819b8dfc86b9fecdfc36ca7774c6a2d/modules/graceful/restart_unix.go#L34-L88 On a graceful restart Gitea sets LISTEN_FDS itself.
as I say above the simplest solution is going to be to use something like `UNLINK_FDS` I think this would do it: Patch ```patch diff --git a/modules/graceful/net_unix.go b/modules/graceful/net_unix.go index 680ff529a..21c1b31ca...