diff options
Diffstat (limited to 'src/zenserver-test/zenserver-test.cpp')
| -rw-r--r-- | src/zenserver-test/zenserver-test.cpp | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/zenserver-test/zenserver-test.cpp b/src/zenserver-test/zenserver-test.cpp index 34f058807..6aa58ee14 100644 --- a/src/zenserver-test/zenserver-test.cpp +++ b/src/zenserver-test/zenserver-test.cpp @@ -59,8 +59,6 @@ ZEN_THIRD_PARTY_INCLUDES_END # include <process.h> #endif -#include <asio.hpp> - ////////////////////////////////////////////////////////////////////////// #include "projectclient.h" @@ -2342,54 +2340,6 @@ private: std::vector<std::unique_ptr<ZenServerInstance> > m_Instances; }; -class IoDispatcher -{ -public: - IoDispatcher(asio::io_context& IoCtx) : m_IoCtx(IoCtx) {} - ~IoDispatcher() { Stop(); } - - void Run() - { - Stop(); - - m_Running = true; - - m_IoThread = std::thread([this]() { - try - { - m_IoCtx.run(); - } - catch (std::exception& Error) - { - m_Error = Error; - } - }); - } - - void Stop() - { - if (m_Running) - { - m_Running = false; - - if (m_IoThread.joinable()) - { - m_IoThread.join(); - } - } - } - - bool IsRunning() const { return m_Running; } - - const std::exception& Error() { return m_Error; } - -private: - asio::io_context& m_IoCtx; - std::thread m_IoThread; - std::exception m_Error; - std::atomic_bool m_Running{false}; -}; - TEST_CASE("http.basics") { using namespace std::literals; |