diff options
Diffstat (limited to 'network-handler/networkhandler.cpp')
| -rw-r--r-- | network-handler/networkhandler.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/network-handler/networkhandler.cpp b/network-handler/networkhandler.cpp index 916f0f2..614d270 100644 --- a/network-handler/networkhandler.cpp +++ b/network-handler/networkhandler.cpp @@ -14,9 +14,7 @@ NetworkHandler::NetworkHandler(const ListenSettings& listen_settings) void NetworkHandler::accept_handler(boost::asio::ip::tcp::socket&& socket) { - clients.emplace_back(std::move(socket)); - - auto it = --clients.end(); + std::list<UserClient>::iterator it = clients.emplace(clients.end(), std::move(socket)); clients.back().on_done( [this, it]() { clients.erase(it); |
