@@ -90,7 +90,7 @@ public override Message Clone()
90
90
private bool _canSendTime ;
91
91
private bool _isFirstTimeConnect = true ;
92
92
private bool _suppressDisconnectError ;
93
-
93
+
94
94
/// <summary>
95
95
/// Initializes a new instance of the <see cref="HeartbeatMessageAdapter"/>.
96
96
/// </summary>
@@ -149,6 +149,8 @@ protected override void OnInnerAdapterNewOutMessage(Message message)
149
149
else
150
150
_prevState = _currState = ConnectionStates . Failed ;
151
151
}
152
+
153
+ this . AddLog ( LogLevels . Warning , ( ) => $ "RCM: got error, new state={ _currState } \n { connectMsg . Error } ") ;
152
154
}
153
155
154
156
if ( isRestored )
@@ -307,7 +309,7 @@ protected override bool OnSendInMessage(Message message)
307
309
{
308
310
lock ( _timeSync )
309
311
_canSendTime = true ;
310
- }
312
+ }
311
313
}
312
314
}
313
315
@@ -318,7 +320,7 @@ private void StartTimer()
318
320
319
321
var period = ReConnectionSettings . Interval ;
320
322
var needHeartbeat = HeartbeatInterval != TimeSpan . Zero ;
321
-
323
+
322
324
var time = TimeHelper . Now ;
323
325
var lastHeartBeatTime = TimeHelper . Now ;
324
326
@@ -485,7 +487,7 @@ private static string FormatState(ConnectionStates state)
485
487
{
486
488
case _reConnecting :
487
489
return LocalizedStrings . Reconnecting ;
488
-
490
+
489
491
case _none :
490
492
return LocalizedStrings . Str1658 ;
491
493
@@ -522,4 +524,4 @@ public override IMessageChannel Clone()
522
524
return new HeartbeatMessageAdapter ( InnerAdapter . TypedClone ( ) ) { SuppressReconnectingErrors = SuppressReconnectingErrors } ;
523
525
}
524
526
}
525
- }
527
+ }
0 commit comments