/// <summary>Releases the connection.</summary>
        /// <param name="con">The con.</param>
        public static void ReleaseConnection(OtpConnection con)
        {
            if (con == null)
            {
                return;
            }

            con.close();
        }
Example #2
0
        /// <summary>Executes the RPC.</summary>
        /// <param name="con">The con.</param>
        /// <param name="recycleConnection">if set to <c>true</c> [recycle connection].</param>
        /// <param name="module">The module.</param>
        /// <param name="function">The function.</param>
        private void ExecuteRpc(OtpConnection con, bool recycleConnection, string module, string function)
        {
            con.sendRPC(module, function, new OtpErlangList());
            var response = con.receiveRPC();

            Logger.Debug(module + " response received = " + response);
            if (recycleConnection)
            {
                con.close();
                con = this.CreateConnection();
            }
        }