Hi Emile,<br><br>I see the issue now. My code looks like this:<br><br>var eventArgs = default(BasicDeliverEventArgs);<br>if (!_queueSubscripion.Next(500, out eventArgs))<br>{<br> eventArgs = null;<br>}<br>return eventArgs;<br>
<br>I wasn't aware that in the case where the connection has been dropped that the Next() call would return true but eventArgs would be null. That's my mistake. I will make the chances now to utilise this behaviour.<br>
<br>Thanks again for taking the time to look into the issue. I appreciate it.<br><br>Best regards<br>OJ<br><br><br><br><div class="gmail_quote">On 30 March 2011 00:02, Emile Joubert <span dir="ltr"><<a href="mailto:emile@rabbitmq.com">emile@rabbitmq.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi OJ,<div class="im"><br>
<br>
On 25/03/11 20:35, OJ Reeves wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am surprised to hear that the Dispose() method is called when the<br>
connection is broken yet subsequent calls to subscription.Next()<br>
continue to function and return 'true'. This seems a little<br>
counter-intuitive to me. I would expect that attempting to called Next()<br>
on a subscription that has been disposed would result in some kind of error.<br>
</blockquote>
<br></div>
That's not what I see. As soon as a connection error occurs, the subscription is disposed and calls to Next() return null. Perhaps Dispose() is not getting called in your case. One possible reason for that is an incorrectly trapped exception.<br>
<br>
Regards<br><font color="#888888">
<br>
Emile<br>
</font></blockquote></div><br><br clear="all"><br>-- <br><br>OJ Reeves<br><a href="http://buffered.io/">http://buffered.io/</a><br>