Handle .url endpoint in switches over endpoint. (#48)
Motivation: macOS Catalina brings a .url endpoint to Network.framework, which is currently causing build warnings. We should tolerate it and silence those warnings. Modifications: Do the right thing when we receive a .url endpoint. Result: No build warnings.
This commit is contained in:
parent
4d8fb8e887
commit
afbbeadf08
|
|
@ -301,6 +301,8 @@ extension NIOTSListenerChannel: StateManagedChannel {
|
||||||
parameters.requiredLocalEndpoint = target
|
parameters.requiredLocalEndpoint = target
|
||||||
case .service(_, _, _, let interface):
|
case .service(_, _, _, let interface):
|
||||||
parameters.requiredInterface = interface
|
parameters.requiredInterface = interface
|
||||||
|
case .url:
|
||||||
|
break
|
||||||
@unknown default:
|
@unknown default:
|
||||||
()
|
()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,9 +100,7 @@ extension SocketAddress {
|
||||||
self = .init(addr, host: host.debugDescription)
|
self = .init(addr, host: host.debugDescription)
|
||||||
case .unix(let path):
|
case .unix(let path):
|
||||||
self = try .init(unixDomainSocketPath: path)
|
self = try .init(unixDomainSocketPath: path)
|
||||||
case .service:
|
case .service, .hostPort, .url:
|
||||||
throw NIOTSErrors.UnableToResolveEndpoint()
|
|
||||||
case .hostPort(_, _):
|
|
||||||
throw NIOTSErrors.UnableToResolveEndpoint()
|
throw NIOTSErrors.UnableToResolveEndpoint()
|
||||||
@unknown default:
|
@unknown default:
|
||||||
throw NIOTSErrors.UnableToResolveEndpoint()
|
throw NIOTSErrors.UnableToResolveEndpoint()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue