Join the TcpListener thread in case of a stopWait signal

Change-Id: Ic336c46c9ceecdf4fe52c3c4198f5c6b158ac7f8

git-svn-id: https://svn.apache.org/repos/asf/etch/trunk@1679592 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp b/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp
index 49f0862..8be8da1 100644
--- a/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp
+++ b/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp
@@ -233,6 +233,7 @@
     close();
     ETCH_LOG_DEBUG(mRuntime->getLogger(), mRuntime->getLogger().getTransportContext(), "Stop and wait command received and EtchTcpListener sets the stop flag");
     status_t ret = waitDown(((EtchInt32*) value.get())->get());
+    mThread->join();
     return ret;
   }