protected virtual bool OnKeepAliveError(ServiceResult result)
{
long delta = 0;
lock (m_eventLock)
{
delta = DateTime.UtcNow.Ticks - m_lastKeepAliveTime.Ticks;
}
Utils.Trace(
"KEEP ALIVE LATE: {0}s, EndpointUrl={1}, RequestCount={3}/{2}",
((double)delta)/TimeSpan.TicksPerSecond,
this.Endpoint.EndpointUrl,
this.OutstandingRequestCount,
this.GoodPublishRequestCount);
KeepAliveEventHandler callback = null;
lock (m_eventLock)
{
callback = m_KeepAlive;
}
if (callback != null)
{
try
{
KeepAliveEventArgs args = new KeepAliveEventArgs(result, ServerState.Unknown, DateTime.UtcNow);
callback(this, args);
return !args.CancelKeepAlive;
}
catch (Exception e)
{
Utils.Trace(e, "Session: Unexpected error invoking KeepAliveCallback.");
}
}
return true;
}
#endregion