Resolves both bugfix pdc-6 and pdc-7

This commit is contained in:
Neil Dorin
2019-05-16 10:53:15 -06:00
parent ada6090b43
commit 4aded28792
4 changed files with 5 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -175,7 +175,7 @@ namespace PepperDash.Core
{
Debug.Console(1, this, "Program stopping. Closing connection");
Disconnect();
Client.Dispose();
//Client.Dispose();
}
}
}

View File

@@ -387,13 +387,16 @@ namespace PepperDash.Core
myTcpServer.SocketSendOrReceiveTimeOutInMs = (this.HeartbeatRequiredIntervalMs * 5);
// myTcpServer.HandshakeTimeout = 30;
myTcpServer.SocketStatusChange += new TCPServerSocketStatusChangeEventHandler(TcpServer_SocketStatusChange);
}
else
{
KillServer();
myTcpServer.PortNumber = Port;
}
myTcpServer.SocketStatusChange -= TcpServer_SocketStatusChange;
myTcpServer.SocketStatusChange += new TCPServerSocketStatusChangeEventHandler(TcpServer_SocketStatusChange);
ServerStopped = false;
myTcpServer.WaitForConnectionAsync(IPAddress.Any, TcpConnectCallback);
OnServerStateChange(myTcpServer.State);