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
commit7c7f9bbcf57e15838d15afa94b31d8254b5d7776 (patch)
tree17073f853e6b3a1a95708e8aa0ea12fa42a717e7 /util/network/socket.cpp
parent466f96709329ff77ded50177df94d1893a226c00 (diff)
downloadydb-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.cpp8
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";
}