diff --git a/Pepperdash Core/Pepperdash Core/Comm/GenericSecureTcpIpClient_ForServer.cs b/Pepperdash Core/Pepperdash Core/Comm/GenericSecureTcpIpClient_ForServer.cs index 3b551b2..df61965 100644 --- a/Pepperdash Core/Pepperdash Core/Comm/GenericSecureTcpIpClient_ForServer.cs +++ b/Pepperdash Core/Pepperdash Core/Comm/GenericSecureTcpIpClient_ForServer.cs @@ -382,6 +382,15 @@ namespace PepperDash.Core //OnClientReadyForcommunications(false); // Should send false event }, 15000); } + else + { + //CLient connected and shared key is not required so just raise the ready for communication event. if Shared key + //required this is called by the shared key being negotiated + if (IsReadyForCommunication == false) + { + OnClientReadyForcommunications(true); // Key not required + } + } } else { @@ -500,14 +509,8 @@ namespace PepperDash.Core Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Shared key confirmed. Ready for communication"); OnClientReadyForcommunications(true); // Successful key exchange } - else if (SharedKeyRequired == false && IsReadyForCommunication == false) - { - OnClientReadyForcommunications(true); // Key not required - } - else { - //var bytesHandler = BytesReceived; //if (bytesHandler != null) // bytesHandler(this, new GenericCommMethodReceiveBytesArgs(bytes));