mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-17 17:23:30 +03:00
fix: remove previous socket file to prevent bind error (#979)
This commit is contained in:
@@ -119,6 +119,7 @@ func initRouterInternal(db *gorm.DB, svc *services) (utils.Service, error) {
|
||||
if common.EnvConfig.UnixSocket != "" {
|
||||
network = "unix"
|
||||
addr = common.EnvConfig.UnixSocket
|
||||
os.Remove(addr) // remove dangling the socket file to avoid file-exist error
|
||||
}
|
||||
|
||||
listener, err := net.Listen(network, addr) //nolint:noctx
|
||||
|
||||
Reference in New Issue
Block a user