refactor(gradle, desktop): Build-Konfiguration bereinigt, Ports optimiert und UI-Logik konsolidiert

Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
2026-05-09 14:27:17 +02:00
parent 280db663c7
commit 8d176ce955
10 changed files with 123 additions and 107 deletions
@@ -45,6 +45,7 @@ class JvmP2pSyncService : P2pSyncService {
}
// Prozessweiter, portbasierter Guard
println("[P2P Server] Versuche Port $port zu reservieren...")
if (!startedPorts.add(port)) {
println("[P2P Server] Bereits gestartet (Prozess) auf Port $port idempotent, kein neuer Bind")
return
@@ -79,7 +80,6 @@ class JvmP2pSyncService : P2pSyncService {
}
}.start(wait = false)
currentPort = port
println("[P2P Server] Gestartet auf Port $port")
} catch (e: Exception) {
// Start fehlgeschlagen -> Port-Lock wieder freigeben
startedPorts.remove(port)