mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 23:21:36 +00:00
refactor(macos): centralize gateway endpoint resolution
This commit is contained in:
@@ -220,7 +220,7 @@ final class WebChatWindowController: NSWindowController, WKNavigationDelegate, N
|
||||
|
||||
private func prepareGatewayPort() async throws -> Int {
|
||||
if CommandResolver.connectionModeIsRemote() {
|
||||
let forwarded = try await RemoteTunnelManager.shared.ensureControlTunnel()
|
||||
let forwarded = try await GatewayEndpointStore.shared.ensureRemoteControlTunnel()
|
||||
return Int(forwarded)
|
||||
}
|
||||
return GatewayEnvironment.gatewayPort()
|
||||
@@ -684,7 +684,7 @@ final class WebChatManager {
|
||||
let gatewayPort: Int
|
||||
if CommandResolver.connectionModeIsRemote() {
|
||||
do {
|
||||
let forwarded = try await RemoteTunnelManager.shared.ensureControlTunnel()
|
||||
let forwarded = try await GatewayEndpointStore.shared.ensureRemoteControlTunnel()
|
||||
gatewayPort = Int(forwarded)
|
||||
|
||||
let root = try WebChatWindowController.webChatAssetsRootURL()
|
||||
|
||||
Reference in New Issue
Block a user