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:
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user