face: Workaround to Boost.Asio bug 8795 with async_connect
Change-Id: I033a9ae719306f1af605124d982df60b9a8e7372
Refs: #1736
diff --git a/daemon/face/tcp-channel.cpp b/daemon/face/tcp-channel.cpp
index 3986828..1d61709 100644
--- a/daemon/face/tcp-channel.cpp
+++ b/daemon/face/tcp-channel.cpp
@@ -207,7 +207,16 @@
{
scheduler::cancel(connectTimeoutEvent);
+#if (BOOST_VERSION == 105400)
+ // To handle regression in Boost 1.54
+ // https://svn.boost.org/trac/boost/ticket/8795
+ boost::system::error_code anotherErrorCode;
+ socket->remote_endpoint(anotherErrorCode);
+ if (error || anotherErrorCode) {
+#else
if (error) {
+#endif
+
if (error == boost::system::errc::operation_canceled) // when socket is closed by someone
return;