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
|
||||
case .service(_, _, _, let interface):
|
||||
parameters.requiredInterface = interface
|
||||
case .url:
|
||||
break
|
||||
@unknown default:
|
||||
()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,9 +100,7 @@ extension SocketAddress {
|
|||
self = .init(addr, host: host.debugDescription)
|
||||
case .unix(let path):
|
||||
self = try .init(unixDomainSocketPath: path)
|
||||
case .service:
|
||||
throw NIOTSErrors.UnableToResolveEndpoint()
|
||||
case .hostPort(_, _):
|
||||
case .service, .hostPort, .url:
|
||||
throw NIOTSErrors.UnableToResolveEndpoint()
|
||||
@unknown default:
|
||||
throw NIOTSErrors.UnableToResolveEndpoint()
|
||||
|
|
|
|||
Loading…
Reference in New Issue