remove readable check when opening a socket connection

master
Loris Cro 2020-05-07 02:00:39 +02:00 committed by Andrew Kelley
parent 7e8b859095
commit 35a59b5b0f
1 changed files with 1 additions and 1 deletions

View File

@ -2549,7 +2549,7 @@ pub fn connect(sockfd: fd_t, sock_addr: *const sockaddr, len: socklen_t) Connect
EAFNOSUPPORT => return error.AddressFamilyNotSupported,
EAGAIN, EINPROGRESS => {
const loop = std.event.Loop.instance orelse return error.WouldBlock;
loop.waitUntilFdWritableOrReadable(sockfd);
loop.waitUntilFdWritable(sockfd);
return getsockoptError(sockfd);
},
EALREADY => unreachable, // The socket is nonblocking and a previous connection attempt has not yet been completed.