From 1130568e39b707113caa97b144b18bffd0df0167 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sun, 26 Jun 2022 14:54:11 +0400 Subject: [PATCH] Actually, this check is reduntant, move defering to network type check. --- cmd/justcaptchad/main.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd/justcaptchad/main.go b/cmd/justcaptchad/main.go index 4757f12..a422de6 100644 --- a/cmd/justcaptchad/main.go +++ b/cmd/justcaptchad/main.go @@ -28,10 +28,6 @@ func main() { return } - if !strings.ContainsRune(*listenAddress, ':') { - defer os.Remove(*listenAddress) - } - captcha.Init(*captchaExpire) hand := handlers.New(*captchaExpire) @@ -45,6 +41,7 @@ func main() { var network string if !strings.ContainsRune(*listenAddress, ':') { network = "unix" + defer os.Remove(*listenAddress) } else { ap, err := netip.ParseAddrPort(*listenAddress) if err != nil {