修改获取用户列表API

This commit is contained in:
2018-12-17 21:53:52 +08:00
parent 88053b0cd4
commit f7006ad5c1
10 changed files with 145 additions and 96 deletions
+4 -6
View File
@@ -6,9 +6,9 @@ using Newtonsoft.Json;
using System.Net;
using System.Net.Sockets;
//StormClient发送数据相关内容
namespace Interact
{
//发送数据相关内容
public partial class StormClient
{
// 消息写入线程,向tcp连接写入数据
@@ -20,7 +20,7 @@ namespace Interact
foreach (Packet packet in sendQueue.GetConsumingEnumerable())
{
//结束循环
if (!tcpClient.Connected)
if (StormClient.Status != ClientStatus.Running)
break;
//向tcp连接写数据
byte[] lenBuffer; //数据长度缓存
@@ -43,13 +43,11 @@ namespace Interact
}
catch (System.IO.IOException ex)
{
tcpClient.Close();
OnDisconnect?.Invoke(ex);
HandleConnectionBroken(ex);
}
catch (ObjectDisposedException ex)
{
tcpClient.Close();
OnDisconnect?.Invoke(ex);
HandleConnectionBroken(ex);
}
}
//发送数据