diff --git a/lib/malloy/core/websocket/connection.hpp b/lib/malloy/core/websocket/connection.hpp index a46617b..ef3d955 100644 --- a/lib/malloy/core/websocket/connection.hpp +++ b/lib/malloy/core/websocket/connection.hpp @@ -145,11 +145,17 @@ namespace malloy::websocket [this, me, target, done = std::forward(done), resource](auto ec, auto ep) mutable { if (ec) { done(ec); - } else { - me->on_connect(ec, ep, resource, [this, done = std::forward(done)](auto ec) mutable { - go_active(); - std::invoke(std::forward(done), ec); - }); + } + else { + me->on_connect( + ec, + ep, + resource, + [this, done = std::forward(done)](auto ec) mutable { + go_active(); + std::invoke(std::forward(done), ec); + } + ); } }); });