src/HarmonyHub/Client.cs
/// <summary>
/// Heartbeat ping. Failure will result in the heartbeat being stopped, which will
/// make any future calls throw an exception as the heartbeat indicator will be disabled.
/// </summary>
/// <param name="sender">Sender of event.</param>
/// <param name="e">Event parameters.</param>
Heartbeat ping. Failure will result in the heartbeat being stopped, which will
make any future calls throw an exception as the heartbeat indicator will be disabled.
Heartbeat ping . Failure will result in the heartbeat being stopped which will make any future calls throw an exception as the heartbeat indicator will be disabled .
private async void HeatbeatAsync(object sender, ElapsedEventArgs e)
        {
            try
            {
                await SendPingAsync().ConfigureAwait(false);
            }
            catch (Exception ex)
            {
                Error?.Invoke(this, new ErrorEventArgs(ex));
                System.Timers.Timer timer = (System.Timers.Timer)sender;
                timer.Stop();
            }
        }
private async void HeatbeatAsync ( object sender , ElapsedEventArgs e ) { try { await SendPingAsync ( ) . ConfigureAwait ( false ) ; } catch ( Exception ex ) { Error ? . Invoke ( this , new ErrorEventArgs ( ex ) ) ; System . Timers . Timer timer = ( System . Timers . Timer ) sender ; timer . Stop ( ) ; } }
Heartbeat ping.
Heartbeat ping .
sender
object
Sender of event.
Sender of event .
e
ElapsedEventArgs
None