From b4d5a32a7cc9035bb1efa29ad062cd2bd70ad898 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期二, 04 九月 2018 16:15:14 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 Core/NetworkPackage/Socket/ClientSocketController.cs |   30 +++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/Core/NetworkPackage/Socket/ClientSocketController.cs b/Core/NetworkPackage/Socket/ClientSocketController.cs
index 4fe1a58..766d090 100644
--- a/Core/NetworkPackage/Socket/ClientSocketController.cs
+++ b/Core/NetworkPackage/Socket/ClientSocketController.cs
@@ -9,7 +9,8 @@
 public class ClientSocketController
 {
     Socket m_Socket;
-    public Socket socket {
+    public Socket socket
+    {
         get { return m_Socket; }
     }
 
@@ -114,16 +115,31 @@
     /// </summary>
     public void CloseConnect()
     {
-        isStopTreading = true;
-        if (m_packageThread != null)
+        try
         {
-            m_packageThread.Abort();
+            isStopTreading = true;
+            if (m_packageThread != null)
+            {
+                m_packageThread.Abort();
+            }
+        }
+        catch (System.Exception ex)
+        {
+            DebugEx.Log(ex);
         }
 
-        if (m_Socket != null && m_Socket.Connected)
+        try
         {
-            m_Socket.Shutdown(SocketShutdown.Both);
-            m_Socket.Close();
+            if (m_Socket != null && m_Socket.Connected)
+            {
+                m_Socket.Shutdown(SocketShutdown.Both);
+                m_Socket.Close();
+            }
+
+        }
+        catch (System.Exception ex)
+        {
+            DebugEx.Log(ex);
         }
 
         sendQueue.Clear();

--
Gitblit v1.8.0