完善ProcessAccept
This commit is contained in:
parent
4211f40b6c
commit
4330dd92a5
@ -321,6 +321,9 @@ namespace HaoYueNet.ServerNetwork
|
||||
try
|
||||
{
|
||||
Interlocked.Increment(ref m_clientCount);
|
||||
//确保监听结束时,有连接才抛给数据接收
|
||||
if (e.AcceptSocket.RemoteEndPoint != null)
|
||||
{
|
||||
// Get the socket for the accepted client connection and put it into the
|
||||
//ReadEventArg object user token
|
||||
SocketAsyncEventArgs readEventArgs = m_Receivepool.Pop();
|
||||
@ -347,6 +350,7 @@ namespace HaoYueNet.ServerNetwork
|
||||
ProcessReceive(readEventArgs);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception me)
|
||||
{
|
||||
//RuncomLib.Log.LogUtils.Info(me.Message + "\r\n" + me.StackTrace);
|
||||
|
@ -321,6 +321,10 @@ namespace HaoYueNet.ServerNetwork
|
||||
try
|
||||
{
|
||||
Interlocked.Increment(ref m_clientCount);
|
||||
|
||||
//确保监听结束时,有连接才抛给数据接收
|
||||
if (e.AcceptSocket.RemoteEndPoint != null)
|
||||
{
|
||||
// Get the socket for the accepted client connection and put it into the
|
||||
//ReadEventArg object user token
|
||||
SocketAsyncEventArgs readEventArgs = m_Receivepool.Pop();
|
||||
@ -347,6 +351,7 @@ namespace HaoYueNet.ServerNetwork
|
||||
ProcessReceive(readEventArgs);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception me)
|
||||
{
|
||||
//RuncomLib.Log.LogUtils.Info(me.Message + "\r\n" + me.StackTrace);
|
||||
|
Loading…
Reference in New Issue
Block a user