BonCodeAJP13.BonCodeAJP13ServerConnection.ConnectionError C# (CSharp) Method

ConnectionError() private method

Close connection and its Network stream and invoke the Connection Returned event with failure string. This function has one override with string that can be passed.
private ConnectionError ( ) : void
return void
        private void ConnectionError()
        {
            //if (p_Logger != null) p_Logger.LogMessage("One Connection raised an error", BonCodeAJP13LogLevels.BONCODEAJP13_LOG_ERRORS);
            //attempt to close stream
            try
            {
               p_NetworkStream.Close();
            }
            catch (Exception e)
            {
                //log exception
                if (p_Logger != null) p_Logger.LogException(e, "Stream Close:", BonCodeAJP13LogLevels.BONCODEAJP13_LOG_ERRORS);
            }

            //now raise the error for the call handler it will close TCP client
            if (BonCodeAJP13Settings.BONCODEAJP13_ENABLE_HTTPSTATUSCODES)
            {
                throw new InvalidOperationException("Connection between Tomcat and IIS experienced error. If you restarted Tomcat this is expected. ");
            }
        }

Same methods

BonCodeAJP13ServerConnection::ConnectionError ( string message = "", string messageType = "" ) : void