private void OnClientTick(object source, ElapsedEventArgs e) { try { _client.TickTack(); //Console.WriteLine(_client.InnerChannel.State); //Console.WriteLine(_client.InnerDuplexChannel.State); } catch (Exception ex) { if (ErrorOccur != null) { ErrorOccur(this, new ModelEventArgs(ModelEventType.ServerTimeout) { ErrorMessage = "与服务器断开连接,准备重新连接" }); } Console.WriteLine(ex); } }