mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-02-22 16:41:28 +08:00
Delete old socket file if it exists
This commit is contained in:
parent
8d3d24a58a
commit
28713ec9db
@ -5,6 +5,7 @@ import (
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/Flashfyre/pokerogue-server/api"
|
||||
"github.com/Flashfyre/pokerogue-server/db"
|
||||
@ -27,6 +28,10 @@ func main() {
|
||||
log.Fatalf("failed to initialize database: %s", err)
|
||||
}
|
||||
|
||||
if *network == "unix" {
|
||||
os.Remove(*address)
|
||||
}
|
||||
|
||||
listener, err := net.Listen(*network, *address)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create net listener: %s", err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user