Skip to content

Commit

Permalink
BaseSocket: Remove dead code in BaseSocket.bind(to:) (#2086)
Browse files Browse the repository at this point in the history
Signed-off-by: Si Beaumont <[email protected]>
  • Loading branch information
simonjbeaumont authored Apr 22, 2022
1 parent 1fbb42b commit 124119f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Sources/NIOPosix/BaseSocket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<sockaddr>, 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))
}
Expand Down

0 comments on commit 124119f

Please sign in to comment.