aboutsummaryrefslogtreecommitdiffstats
path: root/util/network
diff options
context:
space:
mode:
authorsyanenko <syanenko@yandex-team.ru>2022-02-10 16:52:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:52:01 +0300
commita63159035b82f88d84ff4ae44eabe166561fbce3 (patch)
tree445ca9602c5070918fe56b9dc1887005c39f7997 /util/network
parent9fb6b07ce98b16ba076a7eaf8d90c335276df153 (diff)
downloadydb-a63159035b82f88d84ff4ae44eabe166561fbce3.tar.gz
Restoring authorship annotation for <syanenko@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/network')
-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..bd1d5eb0f0 100644
--- a/util/network/socket.cpp
+++ b/util/network/socket.cpp
@@ -268,19 +268,19 @@ bool GetRemoteAddr(SOCKET Socket, char* str, socklen_t size) {
void SetSocketTimeout(SOCKET s, long timeout) {
SetSocketTimeout(s, timeout, 0);
}
-
+
void SetSocketTimeout(SOCKET s, long sec, long msec) {
-#ifdef SO_SNDTIMEO
+#ifdef SO_SNDTIMEO
#ifdef _darwin_
const timeval timeout = {sec, (__darwin_suseconds_t)msec * 1000};
#elif defined(_unix_)
const timeval timeout = {sec, msec * 1000};
#else
- const int timeout = sec * 1000 + msec;
+ const int timeout = sec * 1000 + msec;
#endif
CheckedSetSockOpt(s, SOL_SOCKET, SO_RCVTIMEO, timeout, "recv timeout");
CheckedSetSockOpt(s, SOL_SOCKET, SO_SNDTIMEO, timeout, "send timeout");
-#endif
+#endif
}
void SetLinger(SOCKET s, bool on, unsigned len) {