From 7590c43344e530e3085e494293959aca9cd7e17b Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期三, 23 十二月 2020 17:12:38 +0800
Subject: [PATCH] update

---
 test_net_socket/test_net_mod_socket.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/test_net_socket/test_net_mod_socket.c b/test_net_socket/test_net_mod_socket.c
index 5693cf6..2b2a56a 100644
--- a/test_net_socket/test_net_mod_socket.c
+++ b/test_net_socket/test_net_mod_socket.c
@@ -85,7 +85,7 @@
 
 
 void *bus_handler(void *sockt) {
-  pthread_detach(pthread_self());
+  // pthread_detach(pthread_self());
   
   char action[512];
   while ( true) {
@@ -119,6 +119,10 @@
     printf("start bus failed\n");
     exit(1);
   }
+
+  if (pthread_join(tid, NULL) != 0) {
+    perror(" pthread_join");
+  }
 }
 
  

--
Gitblit v1.8.0