diff options
author | jimmy <jimmy@yandex-team.ru> | 2022-02-10 16:49:38 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:38 +0300 |
commit | 5ab412f19b9312abbfa362391df45d6603bb84c3 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/http/server | |
parent | affdafdb1fc09bf0bfc384355143ee6db9e90046 (diff) | |
download | ydb-5ab412f19b9312abbfa362391df45d6603bb84c3.tar.gz |
Restoring authorship annotation for <jimmy@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/http/server')
-rw-r--r-- | library/cpp/http/server/http.cpp | 16 | ||||
-rw-r--r-- | library/cpp/http/server/http_ut.cpp | 8 |
2 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/http/server/http.cpp b/library/cpp/http/server/http.cpp index 13e3832f533..128583bdd70 100644 --- a/library/cpp/http/server/http.cpp +++ b/library/cpp/http/server/http.cpp @@ -197,8 +197,8 @@ public: ListenStartEvent.Reset(); try { - ListenThread.Reset(new TThread(ListenSocketFunction, this)); - ListenThread->Start(); + ListenThread.Reset(new TThread(ListenSocketFunction, this)); + ListenThread->Start(); } catch (const yexception&) { SaveErrorCode(); return false; @@ -214,9 +214,9 @@ public: Cb_->OnWait(); TGuard<TMutex> g(StopMutex); if (ListenThread) { - ListenThread->Join(); + ListenThread->Join(); ListenThread.Reset(nullptr); - } + } } void Stop() { @@ -224,9 +224,9 @@ public: TGuard<TMutex> g(StopMutex); if (ListenThread) { - ListenThread->Join(); + ListenThread->Join(); ListenThread.Reset(nullptr); - } + } while (ConnectionCount) { usleep(10000); @@ -398,7 +398,7 @@ public: } TImpl(THttpServer* parent, ICallBack* cb, TMtpQueueRef mainWorkers, TMtpQueueRef failWorkers, const TOptions& options_) - : Requests(mainWorkers) + : Requests(mainWorkers) , FailRequests(failWorkers) , Options_(options_) , Cb_(cb) @@ -442,7 +442,7 @@ public: return Options_.MaxConnections && ((size_t)GetClientCount() >= Options_.MaxConnections); } - THolder<TThread> ListenThread; + THolder<TThread> ListenThread; TPipeHandle ListenWakeupReadFd; TPipeHandle ListenWakeupWriteFd; TSystemEvent ListenStartEvent; diff --git a/library/cpp/http/server/http_ut.cpp b/library/cpp/http/server/http_ut.cpp index a96f4ab68bf..cc62bb988e7 100644 --- a/library/cpp/http/server/http_ut.cpp +++ b/library/cpp/http/server/http_ut.cpp @@ -329,7 +329,7 @@ Y_UNIT_TEST_SUITE(THttpServerTest) { TEchoServer serverImpl(res); THttpServer server(&serverImpl, THttpServer::TOptions(port).EnableKeepAlive(true).EnableCompression(true)); - for (int i = 0; i < 2; ++i) { + for (int i = 0; i < 2; ++i) { UNIT_ASSERT(server.Start()); TTestRequest r(port); @@ -362,9 +362,9 @@ Y_UNIT_TEST_SUITE(THttpServerTest) { } } } - } - - server.Stop(); + } + + server.Stop(); } } |