chore: Apply clang-format width 100 (#6387)

This commit is contained in:
Ayaz Salikhov
2026-02-19 23:30:00 +00:00
parent 25cca46553
commit 2c1fad1023
786 changed files with 26105 additions and 12252 deletions

View File

@@ -49,7 +49,8 @@ class WSClientImpl : public WSClient
continue;
using namespace boost::asio::ip;
if (pp.ip && pp.ip->is_unspecified())
*pp.ip = pp.ip->is_v6() ? address{address_v6::loopback()} : address{address_v4::loopback()};
*pp.ip = pp.ip->is_v6() ? address{address_v6::loopback()}
: address{address_v4::loopback()};
if (!pp.port)
Throw<std::runtime_error>("Use fixConfigPorts with auto ports");
@@ -100,16 +101,17 @@ class WSClientImpl : public WSClient
boost::asio::post(ios_, boost::asio::bind_executor(strand_, [this] {
if (!peerClosed_)
{
ws_.async_close({}, boost::asio::bind_executor(strand_, [&](error_code) {
try
{
stream_.cancel();
}
catch (boost::system::system_error const&)
{
// ignored
}
}));
ws_.async_close(
{}, boost::asio::bind_executor(strand_, [&](error_code) {
try
{
stream_.cancel();
}
catch (boost::system::system_error const&)
{
// ignored
}
}));
}
}));
work_ = std::nullopt;
@@ -134,10 +136,11 @@ public:
auto const ep = getEndpoint(cfg, v2);
stream_.connect(ep);
ws_.set_option(
boost::beast::websocket::stream_base::decorator([&](boost::beast::websocket::request_type& req) {
for (auto const& h : headers)
req.set(h.first, h.second);
}));
boost::beast::websocket::stream_base::decorator(
[&](boost::beast::websocket::request_type& req) {
for (auto const& h : headers)
req.set(h.first, h.second);
}));
ws_.handshake(ep.address().to_string() + ":" + std::to_string(ep.port()), "/");
ws_.async_read(
rb_,
@@ -179,7 +182,8 @@ public:
ws_.write_some(true, buffer(s));
}
auto jv = findMsg(5s, [&](Json::Value const& jval) { return jval[jss::type] == jss::response; });
auto jv =
findMsg(5s, [&](Json::Value const& jval) { return jval[jss::type] == jss::response; });
if (jv)
{
// Normalize JSON output
@@ -215,7 +219,8 @@ public:
}
std::optional<Json::Value>
findMsg(std::chrono::milliseconds const& timeout, std::function<bool(Json::Value const&)> pred) override
findMsg(std::chrono::milliseconds const& timeout, std::function<bool(Json::Value const&)> pred)
override
{
std::shared_ptr<msg> m;
{
@@ -268,7 +273,8 @@ private:
}
ws_.async_read(
rb_,
boost::asio::bind_executor(strand_, std::bind(&WSClientImpl::on_read_msg, this, std::placeholders::_1)));
boost::asio::bind_executor(
strand_, std::bind(&WSClientImpl::on_read_msg, this, std::placeholders::_1)));
}
// Called when the read op terminates