summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsyanenko <[email protected]>2022-02-10 16:52:01 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:52:01 +0300
commit9bfacdf3213e2486cecf5e1dd31ebb42f093aa2f (patch)
treeab7fbbf3253d4c0e2793218f09378908beb025fb
parenta63159035b82f88d84ff4ae44eabe166561fbce3 (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
-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 bd1d5eb0f02..4f6e8043462 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) {