diff options
author | vmordovin <vmordovin@yandex-team.ru> | 2022-02-10 16:48:14 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:14 +0300 |
commit | 7c7f9bbcf57e15838d15afa94b31d8254b5d7776 (patch) | |
tree | 17073f853e6b3a1a95708e8aa0ea12fa42a717e7 /util/network/socket.cpp | |
parent | 466f96709329ff77ded50177df94d1893a226c00 (diff) | |
download | ydb-7c7f9bbcf57e15838d15afa94b31d8254b5d7776.tar.gz |
Restoring authorship annotation for <vmordovin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/network/socket.cpp')
-rw-r--r-- | util/network/socket.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/network/socket.cpp b/util/network/socket.cpp index 4f6e804346..8e8cbf6b5d 100644 --- a/util/network/socket.cpp +++ b/util/network/socket.cpp @@ -283,7 +283,7 @@ void SetSocketTimeout(SOCKET s, long sec, long msec) { #endif } -void SetLinger(SOCKET s, bool on, unsigned len) { +void SetLinger(SOCKET s, bool on, unsigned len) { #ifdef SO_LINGER struct linger l = {on, (u_short)len}; @@ -1162,10 +1162,10 @@ static inline void SetNonBlockSocket(SOCKET fd, int value) { unsigned long outbuf = 0; DWORD written = 0; - if (!inbuf) { + if (!inbuf) { WSAEventSelect(fd, nullptr, 0); - } - + } + if (WSAIoctl(fd, FIONBIO, &inbuf, sizeof(inbuf), &outbuf, sizeof(outbuf), &written, 0, 0) == SOCKET_ERROR) { ythrow TSystemError() << "can not set non block socket state"; } |