[rabbitmq-discuss] Exeption in .NET Client Sample (when disposing)

Andrius Norkaitis Andrius.Norkaitis at oryo.lt
Tue Oct 14 09:54:56 BST 2008


Hi,

 

I debugged "senstring" example and detected that .NET Client throws
exception when IConnection is disposed/closed.

 

Code:

 

            using (IConnection conn = new
ConnectionFactory().CreateConnection(serverAddress))

                 {

                     using (IModel ch = conn.CreateModel())

                     {

                         ushort ticket = ch.AccessRequest("/data");

 

                         if (exchange != "")

                         {

                             ch.ExchangeDeclare(ticket, exchange,
exchangeType);

                         }

 

                         ch.BasicPublish(ticket,

                                         exchange,

                                         routingKey,

                                         null,

                                         SerializeObject(order));

 

                     }

                 } //Traced, that exeption is coused somewhere in Client,
when disposing

 

A first chance exception of type 'System.ObjectDisposedException' occurred
in System.dll

 

 

Can somebody try and confirm it?

 

Andrius

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20081014/284a14d2/attachment.htm 


More information about the rabbitmq-discuss mailing list