From 65c527961165ba77d01b2060dfffb20cfda3d9dd Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Thu, 5 Nov 2015 16:39:27 -0800 Subject: [PATCH] Fixing style. --- src/xenia/base/socket_win.cc | 41 +++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/src/xenia/base/socket_win.cc b/src/xenia/base/socket_win.cc index 1b8d35dae..a7b13b509 100644 --- a/src/xenia/base/socket_win.cc +++ b/src/xenia/base/socket_win.cc @@ -259,26 +259,29 @@ class Win32SocketServer : public SocketServer { return false; } - accept_thread_ = xe::threading::Thread::Create({}, [this, port]() { - xe::threading::set_name(std::string("xe::SocketServer localhost:") + - std::to_string(port)); - while (socket_ != INVALID_SOCKET) { - sockaddr_in6 client_addr; - int client_count = sizeof(client_addr); - SOCKET client_socket = accept( - socket_, reinterpret_cast(&client_addr), &client_count); - if (client_socket == INVALID_SOCKET) { - continue; - } + accept_thread_ = xe::threading::Thread::Create( + {}, + [this, port]() { + xe::threading::set_name(std::string("xe::SocketServer localhost:") + + std::to_string(port)); + while (socket_ != INVALID_SOCKET) { + sockaddr_in6 client_addr; + int client_count = sizeof(client_addr); + SOCKET client_socket = + accept(socket_, reinterpret_cast(&client_addr), + &client_count); + if (client_socket == INVALID_SOCKET) { + continue; + } - auto client = std::make_unique(); - if (!client->Accept(client_socket)) { - XELOGE("Unable to accept socket; ignoring"); - continue; - } - accept_callback_(std::move(client)); - } - }); + auto client = std::make_unique(); + if (!client->Accept(client_socket)) { + XELOGE("Unable to accept socket; ignoring"); + continue; + } + accept_callback_(std::move(client)); + } + }); return true; }