mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-06 07:29:42 +02:00
fix: tunnel button stuck on "Connecting..." when already running
Re-broadcast tunnel:started SSE event when tunnel is already active and user toggles the setting, so the client receives the URL. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4033,6 +4033,10 @@ NOW: Generate the implementation plan for the task above. Think step by step.`;
|
||||
if (tunnelEnabled && !this.tunnelManager.isRunning()) {
|
||||
this.tunnelManager.start(this.port, this.https);
|
||||
console.log('Tunnel started via settings change');
|
||||
} else if (tunnelEnabled && this.tunnelManager.isRunning() && this.tunnelManager.getUrl()) {
|
||||
// Tunnel already running — re-emit so the client gets the URL
|
||||
this.broadcast('tunnel:started', { url: this.tunnelManager.getUrl() });
|
||||
console.log('Tunnel already running, re-broadcast URL to client');
|
||||
} else if (!tunnelEnabled && this.tunnelManager.isRunning()) {
|
||||
this.tunnelManager.stop();
|
||||
console.log('Tunnel stopped via settings change');
|
||||
|
||||
Reference in New Issue
Block a user