aboutsummaryrefslogtreecommitdiffstats
path: root/util/network/socket.cpp
diff options
context:
space:
mode:
authorvmordovin <vmordovin@yandex-team.ru>2022-02-10 16:48:14 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:14 +0300
commit6a1e535429145ec1ecfbc5f1efd3c95323261fb5 (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /util/network/socket.cpp
parent7c7f9bbcf57e15838d15afa94b31d8254b5d7776 (diff)
downloadydb-6a1e535429145ec1ecfbc5f1efd3c95323261fb5.tar.gz
Restoring authorship annotation for <vmordovin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/network/socket.cpp')
-rw-r--r--util/network/socket.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/network/socket.cpp b/util/network/socket.cpp
index 8e8cbf6b5df..4f6e8043462 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";
}