public void CompleteAttach(Attach attach, Error error)
{
if (error != null)
{
this.SendAttach(!attach.Role, attach.InitialDeliveryCount, new Attach() { Target = null, Source = null });
}
else
{
this.SendAttach(!attach.Role, attach.InitialDeliveryCount, new Attach() { Target = attach.Target, Source = attach.Source });
}
base.OnAttach(attach.Handle, attach);
if (error != null)
{
this.Close(0, error);
}
else
{
if (this.credit > 0)
{
this.SendFlow(this.deliveryCount, credit, false);
}
}
}