@@ -285,10 +285,12 @@ result->protocol)) == INVALID_SOCKET) { errNo = of_socket_errno(); continue; } + + _blocking = true; #if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) if ((flags = fcntl(_socket, F_GETFD, 0)) != -1) fcntl(_socket, F_SETFD, flags | FD_CLOEXEC); #endif @@ -394,10 +396,12 @@ @throw [OFBindFailedException exceptionWithHost: host port: port socket: self errNo: of_socket_errno()]; + + _blocking = true; #if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) if ((flags = fcntl(_socket, F_GETFD, 0)) != -1) fcntl(_socket, F_SETFD, flags | FD_CLOEXEC); #endif @@ -631,11 +635,11 @@ int v = enabled; if (setsockopt(_socket, SOL_SOCKET, SO_KEEPALIVE, (char *)&v, (socklen_t)sizeof(v)) != 0) @throw [OFSetOptionFailedException - exceptionWithStream: self + exceptionWithObject: self errNo: of_socket_errno()]; } - (bool)isKeepAliveEnabled { @@ -658,11 +662,11 @@ int v = enabled; if (setsockopt(_socket, IPPROTO_TCP, TCP_NODELAY, (char *)&v, (socklen_t)sizeof(v)) != 0) @throw [OFSetOptionFailedException - exceptionWithStream: self + exceptionWithObject: self errNo: of_socket_errno()]; } - (bool)isTCPNoDelayEnabled {