private void HandleSend(EndpointManager.Send send)
{
if (send.Message is ISystemMessage)
{
var sequencedSend = send.Copy(NextSeq());
TryBuffer(sequencedSend);
// If we have not confirmed the remote UID we cannot transfer the system message at this point just buffer it.
// GotUid will kick ResendAll() causing the messages to be properly written.
// Flow control by not sending more when we already have many outstanding.
if (UidConfirmed && _resendBuffer.NonAcked.Count <= _settings.SysResendLimit) _writer.Tell(sequencedSend);
}
else
{
_writer.Tell(send);
}
}