mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-17 13:44:46 +00:00
adds a null check to Receive()
This commit is contained in:
@@ -335,6 +335,8 @@ namespace PepperDash.Core
|
||||
/// <param name="client"></param>
|
||||
/// <param name="numBytes"></param>
|
||||
void Receive(TCPClient client, int numBytes)
|
||||
{
|
||||
if (client != null)
|
||||
{
|
||||
if (numBytes > 0)
|
||||
{
|
||||
@@ -349,7 +351,9 @@ namespace PepperDash.Core
|
||||
textHandler(this, new GenericCommMethodReceiveTextArgs(str));
|
||||
}
|
||||
}
|
||||
Client.ReceiveDataAsync(Receive);
|
||||
|
||||
client.ReceiveDataAsync(Receive);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user