From e4130d29e80a40884310481ded90ff845c614f43 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期四, 24 十二月 2020 10:03:14 +0800
Subject: [PATCH] bus force bind

---
 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