diff --git a/Sources/NIOPosix/BaseSocket.swift b/Sources/NIOPosix/BaseSocket.swift index da1542b224..1e6962fe67 100644 --- a/Sources/NIOPosix/BaseSocket.swift +++ b/Sources/NIOPosix/BaseSocket.swift @@ -353,10 +353,6 @@ class BaseSocket: BaseSocketProtocol { /// - throws: An `IOError` if the operation failed. func bind(to address: SocketAddress) throws { try self.withUnsafeHandle { fd in - func doBind(ptr: UnsafePointer, bytes: Int) throws { - try NIOBSDSocket.bind(socket: fd, address: ptr, address_len: socklen_t(bytes)) - } - try address.withSockAddr { try NIOBSDSocket.bind(socket: fd, address: $0, address_len: socklen_t($1)) }