NIOPosix: adjust precondition for Windows (#2183)
The member names are not identical across platforms. Add a case to handle the name difference on Windows. Co-authored-by: Cory Benfield <lukasa@apple.com>
This commit is contained in:
parent
01b13a5675
commit
e0df87c5c1
|
@ -172,7 +172,11 @@ struct DatagramVectorReadManager {
|
||||||
totalReadSize += readBytes
|
totalReadSize += readBytes
|
||||||
|
|
||||||
// Next we extract the remote peer address.
|
// Next we extract the remote peer address.
|
||||||
|
#if os(Windows)
|
||||||
|
precondition(self.messageVector[i].msg_hdr.namelen != 0, "Unexpected zero length peer name")
|
||||||
|
#else
|
||||||
precondition(self.messageVector[i].msg_hdr.msg_namelen != 0, "Unexpected zero length peer name")
|
precondition(self.messageVector[i].msg_hdr.msg_namelen != 0, "Unexpected zero length peer name")
|
||||||
|
#endif
|
||||||
let address: SocketAddress = self.sockaddrVector[i].convert()
|
let address: SocketAddress = self.sockaddrVector[i].convert()
|
||||||
|
|
||||||
// Extract congestion information if requested.
|
// Extract congestion information if requested.
|
||||||
|
|
Loading…
Reference in New Issue