face: Call Transport::connect within io_service thread
Previously, there was an indirect call to Transport::connect from within
Face constructor, causing in some cases false timeouts for connect operation.
Change-Id: I6358970e92ead94de977cfde94b5552c4fa24c63
Refs: #2742
diff --git a/src/face.cpp b/src/face.cpp
index 98581b3..1579ee5 100644
--- a/src/face.cpp
+++ b/src/face.cpp
@@ -128,7 +128,7 @@
m_transport = transport;
- m_impl->ensureConnected(false);
+ m_ioService.post([=] { m_impl->ensureConnected(false); });
}
Face::~Face() = default;