protected override SupervisorStrategy SupervisorStrategy()
{
return new OneForOneStrategy(ex =>
{
if (ex is IAssociationProblem)
return Directive.Escalate;
_log.Warning("Association with remote system {0} has failed; address is now gated for {1} ms. Reason is: [{2}]", _remoteAddress, _settings.RetryGateClosedFor.TotalMilliseconds, ex);
UidConfirmed = false; // Need confirmation of UID again
if (_bufferWasInUse)
{
if ((_resendBuffer.Nacked.Any() || _resendBuffer.NonAcked.Any()) && _bailoutAt == null)
_bailoutAt = Deadline.Now + _settings.InitialSysMsgDeliveryTimeout;
Become(() => Gated(writerTerminated: false, earlyUngateRequested: false));
_currentHandle = null;
Context.Parent.Tell(new EndpointWriter.StoppedReading(Self));
return Directive.Stop;
}
return Directive.Escalate;
});
}