4d07e0339569461ac1a4c90c02dfcba7e5fad089
The GUI re-sends the saved network mode as part of its startup config-sync. The SetNetworkMode handler unconditionally tore down + rebuilt the iroh endpoint whenever idle, so every launch rebuilt the freshly-built stack for an identical posture — a needless ~1s teardown+rebuild bounce visible in the logs on both Linux and Windows/Wine (the 'start core loop -> shut down network stack ~1s later' pattern from the Wine spike). Guard the rebuild on an actual mode change; a real change still rebuilds exactly as before. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>