Defered unix socket removing instead.
This commit is contained in:
parent
7cb312f5b9
commit
85b8eb4876
@ -47,6 +47,12 @@ func main() {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if nt, addr := config.SplitNetworkAddress(); nt == "unix" {
|
||||
os.Remove(addr)
|
||||
}
|
||||
}()
|
||||
|
||||
if config.Chroot != "" {
|
||||
if err := syscall.Chroot(config.Chroot); err != nil {
|
||||
log.Fatalln("failed to chroot:", err)
|
||||
@ -122,10 +128,6 @@ func main() {
|
||||
logErr.Fatalln(err)
|
||||
}
|
||||
|
||||
if nt, addr := config.SplitNetworkAddress(); nt == "unix" {
|
||||
os.Remove(addr)
|
||||
}
|
||||
|
||||
closeSignal <- true
|
||||
case <-uploadDirNotify:
|
||||
sz, err := utils.DirectorySize(config.Uploads.Directory)
|
||||
|
Loading…
Reference in New Issue
Block a user