From 21f42210a25d251dcf2ec0d8b5323b293bbdca10 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Thu, 9 Jan 2020 13:45:31 -0800 Subject: [PATCH] formatting --- ws/ws_chat.cpp | 2 +- ws/ws_send.cpp | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ws/ws_chat.cpp b/ws/ws_chat.cpp index 641e4f81..690f5b9c 100644 --- a/ws/ws_chat.cpp +++ b/ws/ws_chat.cpp @@ -10,12 +10,12 @@ // #include "nlohmann/json.hpp" +#include #include #include #include #include #include -#include // for convenience using json = nlohmann::json; diff --git a/ws/ws_send.cpp b/ws/ws_send.cpp index 208fdd10..4e3bc9ff 100644 --- a/ws/ws_send.cpp +++ b/ws/ws_send.cpp @@ -258,17 +258,18 @@ namespace ix MsgPack msg(pdu); Bench bench("Sending file through websocket"); - auto result = _webSocket.sendBinary(msg.dump(), [this, throttle](int current, int total) -> bool { - spdlog::info("ws_send: Step {} out of {}", current + 1, total); + auto result = + _webSocket.sendBinary(msg.dump(), [this, throttle](int current, int total) -> bool { + spdlog::info("ws_send: Step {} out of {}", current + 1, total); - if (throttle) - { - std::chrono::duration duration(10); - std::this_thread::sleep_for(duration); - } + if (throttle) + { + std::chrono::duration duration(10); + std::this_thread::sleep_for(duration); + } - return _connected; - }); + return _connected; + }); if (!result.success) {