private void _DisconnectToApi(IXApi api)
 {
     try
     {
         if (api != null)
         {
             // 断开连接可能卡死
             api.ReconnectInterval = 0;
             api.Disconnect();
             api.Dispose();
             api = null;
         }
     }
     catch (Exception ex)
     {
         xlog.Error(ex.Message);
     }
     finally
     {
         api = null;
     }
 }
예제 #2
0
 public void Disconnect()
 {
     _api.Disconnect();
 }