diff options
author | yuraaka <yuraaka@yandex-team.ru> | 2022-02-10 16:47:05 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:05 +0300 |
commit | 4230543261d7a38ef4dc14785ae0d45f2da43704 (patch) | |
tree | 7d5099e41a66d7501887488432100e3cfc69ea72 /library/cpp/http/server | |
parent | 8cac63f90980b825f78cbd01f45b396297047c2c (diff) | |
download | ydb-4230543261d7a38ef4dc14785ae0d45f2da43704.tar.gz |
Restoring authorship annotation for <yuraaka@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http/server')
-rw-r--r-- | library/cpp/http/server/http.cpp | 8 | ||||
-rw-r--r-- | library/cpp/http/server/options.h | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/http/server/http.cpp b/library/cpp/http/server/http.cpp index 128583bdd7..ef5bd5d6a3 100644 --- a/library/cpp/http/server/http.cpp +++ b/library/cpp/http/server/http.cpp @@ -816,10 +816,10 @@ bool TryToBindAddresses(const THttpServerOptions& options, const std::function<v FixIPv6ListenSocket(socket); - if (options.ReuseAddress) { - int yes = 1; - ::setsockopt(socket, SOL_SOCKET, SO_REUSEADDR, (const char*)&yes, sizeof(yes)); - } + if (options.ReuseAddress) { + int yes = 1; + ::setsockopt(socket, SOL_SOCKET, SO_REUSEADDR, (const char*)&yes, sizeof(yes)); + } if (options.ReusePort) { SetReusePort(socket, true); diff --git a/library/cpp/http/server/options.h b/library/cpp/http/server/options.h index 38eda0e5e7..dfc2258493 100644 --- a/library/cpp/http/server/options.h +++ b/library/cpp/http/server/options.h @@ -56,12 +56,12 @@ public: return *this; } - inline THttpServerOptions& EnableReuseAddress(bool enable) noexcept { - ReuseAddress = enable; - - return *this; - } - + inline THttpServerOptions& EnableReuseAddress(bool enable) noexcept { + ReuseAddress = enable; + + return *this; + } + inline THttpServerOptions& SetThreads(ui32 threads) noexcept { nThreads = threads; @@ -150,7 +150,7 @@ public: bool CompressionEnabled = false; bool RejectExcessConnections = false; bool ReusePort = false; // set SO_REUSEPORT socket option - bool ReuseAddress = true; // set SO_REUSEADDR socket option + bool ReuseAddress = true; // set SO_REUSEADDR socket option TAddrs BindSockaddr; ui16 Port = 17000; // The port on which to run the web server TString Host; // DNS entry |