diff --git a/rcsm/config.go b/rcsm/config.go index d62c55c..5883e9b 100644 --- a/rcsm/config.go +++ b/rcsm/config.go @@ -10,7 +10,7 @@ import ( var ( // Version is the current version of rcsm - Version string = "1.1.3" + Version string = "1.1.4" // EnvFile is the path to the .env file config EnvFile string = ".env" diff --git a/rcsm/servers.go b/rcsm/servers.go index 9369c70..00a006f 100644 --- a/rcsm/servers.go +++ b/rcsm/servers.go @@ -136,21 +136,16 @@ func BackupServer(serverName string) { // Acquire lock on minecraftServers minecraftServersLock.Lock() - defer minecraftServersLock.Unlock() + server := minecraftServers[serverName] + minecraftServersLock.Unlock() TriggerLogEvent("info", serverName, "Backing up server") - server := minecraftServers[serverName] - backupServer(server) } // BackupAllServers backups all servers func BackupAllServers() { - // Acquire lock on minecraftServers - minecraftServersLock.Lock() - defer minecraftServersLock.Unlock() - TriggerLogEvent("info", "rcsm", fmt.Sprintf("Backing up all servers")) for _, server := range minecraftServers { backupServer(server) diff --git a/rcsm/tmux.go b/rcsm/tmux.go index c397f1d..05539ac 100644 --- a/rcsm/tmux.go +++ b/rcsm/tmux.go @@ -59,7 +59,7 @@ func SessionCreate(serverName string, fullPath string, startCommand string) (str return "", err } - if WaitForSessionState(serverName, true, time.Second) != nil { + if WaitForSessionState(serverName, true, 15*time.Second) != nil { return "", fmt.Errorf("Server crashed on start, check server logs") }