X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnet%2Funix%2Fsocket.cpp;h=46c80b7a59000d4b36c788b7c566c5cddb570c15;hb=070af154a0cbced60ea4ca7072df9b51338e2caa;hp=02ef7c3c06c4999e7d62ebe838427918271f6d99;hpb=8248f2912454229f4ded72b8fb4db3e76ea3ad15;p=libs%2Fnet.git diff --git a/source/net/unix/socket.cpp b/source/net/unix/socket.cpp index 02ef7c3..46c80b7 100644 --- a/source/net/unix/socket.cpp +++ b/source/net/unix/socket.cpp @@ -37,7 +37,7 @@ void Socket::set_platform_events(unsigned) void Socket::Private::set_block(bool b) { int flags = fcntl(handle, F_GETFL); - fcntl(handle, F_SETFL, (flags&O_NONBLOCK)|(b?0:O_NONBLOCK)); + fcntl(handle, F_SETFL, (flags&~O_NONBLOCK)|(b?0:O_NONBLOCK)); } int Socket::Private::set_option(int level, int optname, const void *optval, socklen_t optlen)