internal override void OnAttach(uint remoteHandle, Attach attach)
{
var container = ((ListenerConnection)this.Session.Connection).Listener.Container;
Error error = null;
try
{
bool done = container.AttachLink((ListenerConnection)this.Session.Connection, (ListenerSession)this.Session, this, attach);
if (!done)
{
return;
}
}
catch (AmqpException amqpException)
{
error = amqpException.Error;
}
catch (Exception exception)
{
error = new Error() { Condition = ErrorCode.InternalError, Description = exception.Message };
}
this.CompleteAttach(attach, error);
}