NullReferenceException when t == null

Oct 9, 2014 at 8:03 PM
In a case of Exception, sometimes is a t equal null.

sender.Send(
                message,
                (m, o, s) => 
                {
                    var t = (TaskCompletionSource<object>)s;
                    if (o.Descriptor.Code == Codec.Accepted.Code)
                    {
                        t.SetResult(null);
                    }
                    else if (o.Descriptor.Code == Codec.Rejected.Code)
                    {
                       // here is 't' NULL
                        t.SetException(new AmqpException(((Rejected)o).Error));
                    }
                    else
                    {
                        t.SetException(new AmqpException(ErrorCode.InternalError, o.Descriptor.Name));
                    }
                },
To repro this, simply connect to none existing entity.
Coordinator
Oct 10, 2014 at 12:45 AM
The issue has been fixed. Thank you.