Merge pull request #63 from vibe-d/fix_connect_socket_callback
Call the callback on connectStream socket creation failure.
This commit is contained in:
commit
68b8f44957
3 changed files with 8 additions and 2 deletions
|
@ -90,7 +90,10 @@ final class PosixEventDriverSockets(Loop : PosixEventLoop) : EventDriverSockets
|
|||
assert(on_connect !is null);
|
||||
|
||||
auto sockfd = createSocket(address.addressFamily, SOCK_STREAM);
|
||||
if (sockfd == -1) return StreamSocketFD.invalid;
|
||||
if (sockfd == -1) {
|
||||
on_connect(StreamSocketFD.invalid, ConnectStatus.socketCreateFailure);
|
||||
return StreamSocketFD.invalid;
|
||||
}
|
||||
|
||||
auto sock = cast(StreamSocketFD)sockfd;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue