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; } }
public void Disconnect() { _api.Disconnect(); }