Ejemplo n.º 1
0
 public static void ReleaseConnection(OtpConnection con)
 {
     if (con == null)
     {
         return;
     }
     con.close();
 }
 public static void ReleaseConnection(OtpConnection con, IConnectionFactory cf)
 {
     if (con == null)
     {
         return;
     }
     try
     {
         con.close();
     }
     catch (Exception ex)
     {
         logger.Debug("Could not close Otp Connection", ex);
     }
 }
 /// <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();
     }
 }