From c0f1b6c1d45fe851a35903e987292aaf983fe344 Mon Sep 17 00:00:00 2001 From: Knoerle <55956669+Knoerle@users.noreply.github.com> Date: Fri, 13 Nov 2020 08:31:18 +0100 Subject: [PATCH] simplify server creation The port of the server already gets stored inside a local variable, so we should use this one instead of doing another lexical cast on server creation --- example/no_tls_both.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/no_tls_both.cpp b/example/no_tls_both.cpp index e3cb01d59..a95265b66 100644 --- a/example/no_tls_both.cpp +++ b/example/no_tls_both.cpp @@ -340,7 +340,7 @@ int main(int argc, char** argv) { auto s = MQTT_NS::server<>( boost::asio::ip::tcp::endpoint( boost::asio::ip::tcp::v4(), - boost::lexical_cast(argv[1]) + port ), iocs );