Defer unix-socket remove only if a unix-socket actually being used.

This commit is contained in:
Alexander Andreev 2022-06-26 14:50:39 +04:00
parent 3685907891
commit e9dc53e542
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -28,11 +28,9 @@ func main() {
return return
} }
defer func() {
if !strings.ContainsRune(*listenAddress, ':') { if !strings.ContainsRune(*listenAddress, ':') {
os.Remove(*listenAddress) defer os.Remove(*listenAddress)
} }
}()
captcha.Init(*captchaExpire) captcha.Init(*captchaExpire)