Commit 5fe3aeb2ce
Unsigned
Layout: unified · split
LocalAPIService.swift +4 −5
| @@ -372,10 +372,6 @@ private final class LocalAPIServer: @unchecked Sendable { | ||
| 372 | 372 | let parameters = NWParameters.tcp |
| 373 | 373 | parameters.acceptLocalOnly = true |
| 374 | 374 | parameters.allowLocalEndpointReuse = true |
| 375 | parameters.requiredLocalEndpoint = .hostPort( | |
| 376 | host: .ipv4(IPv4Address.loopback), | |
| 377 | port: NWEndpoint.Port(rawValue: UInt16(port)) ?? .any | |
| 378 | ) | |
| 379 | 375 | |
| 380 | 376 | let listener: NWListener |
| 381 | 377 | do { |
| @@ -384,7 +380,10 @@ private final class LocalAPIServer: @unchecked Sendable { | ||
| 384 | 380 | on: NWEndpoint.Port(rawValue: UInt16(port)) ?? .any |
| 385 | 381 | ) |
| 386 | 382 | } catch { |
| 387 | throw LocalAPIServerError.serverStartFailed("Could not start Local API on port \(port).") | |
| 383 | stateLogger("Failed: \(error.localizedDescription)") | |
| 384 | throw LocalAPIServerError.serverStartFailed( | |
| 385 | "Could not start Local API on port \(port): \(error.localizedDescription)" | |
| 386 | ) | |
| 388 | 387 | } |
| 389 | 388 | |
| 390 | 389 | listener.newConnectionHandler = { [weak self] connection in |