fix message for non-blocking connect errors (#203)

Motivation:

If a non-blocking connect failed, the error indicated that `getsockaddr`
failed which isn't true.

Modifications:

Adjusted the message.

Result:

Fewer lies.
This commit is contained in:
Johannes Weiß 2018-03-20 18:11:42 +00:00 committed by Norman Maurer
parent 17d5da5a2c
commit 88b91259f6
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ public typealias IOVector = iovec
func finishConnect() throws {
let result: Int32 = try getOption(level: SOL_SOCKET, name: SO_ERROR)
if result != 0 {
throw IOError(errnoCode: result, function: "getsockopt")
throw IOError(errnoCode: result, reason: "finishing a non-blocking connect failed")
}
}