1
0
Эх сурвалжийг харах

fix #359: TcpClient::startConnect returns non-zero, causing EventLoopThread::stop

ithewei 2 жил өмнө
parent
commit
c07738acce
1 өөрчлөгдсөн 4 нэмэгдсэн , 1 устгасан
  1. 4 1
      evpp/TcpClient.h

+ 4 - 1
evpp/TcpClient.h

@@ -275,7 +275,10 @@ public:
         if (isRunning()) {
             TcpClientEventLoopTmpl<TSocketChannel>::start();
         } else {
-            EventLoopThread::start(wait_threads_started, std::bind(&TcpClientTmpl::startConnect, this));
+            EventLoopThread::start(wait_threads_started, [this]() {
+                TcpClientTmpl::startConnect();
+                return 0;
+            });
         }
     }