Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing disposed object #8

Closed
haf opened this issue Feb 11, 2012 · 6 comments
Closed

Accessing disposed object #8

haf opened this issue Feb 11, 2012 · 6 comments
Milestone

Comments

@haf
Copy link

haf commented Feb 11, 2012

System.ObjectDisposedException was unhandled
  Message=Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
  Source=System
  ObjectName=System.Net.Sockets.Socket
  StackTrace:
       at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Object optionValue)
       at System.Net.Sockets.TcpClient.set_LingerState(LingerOption value)
       at RabbitMQ.Client.Impl.SocketFrameHandler_0_9.Close()
       at RabbitMQ.Client.Impl.ConnectionBase.FinishClose()
       at RabbitMQ.Client.Impl.ConnectionBase.HeartbeatWriteLoop()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

When having connections open and then terminating the server.

Expected some of the RMQ exceptions to be thrown.

Log messages:

The thread '<No Name>' (0x2cb0) has exited with code 0 (0x0).
A first chance exception of type 'System.IO.EndOfStreamException' occurred in RabbitMQ.Client.dll

Lib version: 2.7.1.

This exception tears down the app domain.

@emile
Copy link
Contributor

emile commented Feb 13, 2012

Is this reproducible when running against the most recent version of the library? This may be a duplicate of a solved issue.

@emile
Copy link
Contributor

emile commented Feb 13, 2012

What I meant by "most recent version" was the master branch, rather that the most recent released version. Please let us know if the problem persists on the master branch.

@haf
Copy link
Author

haf commented Feb 13, 2012

I don't know, but if you release the bugfixes on nuget as a patch increment I can try to reproduce it on that. Still, since it's a race condition, I might not be able to reproduce it; and that wouldn't prove it's gone...

@lanwin
Copy link

lanwin commented Mar 13, 2012

I can confirm that to be happen on 2.7.1. We are having code to reconnect on a disconnect. While that this exception happens on different place. I expect it to have todo something with the heartbeat thread.

I also would like to see a real patch on Nuget as soon as possible.

@emile
Copy link
Contributor

emile commented Nov 9, 2012

This problem should have been fixed in 2.8.0 as a result of this change:
http://hg.rabbitmq.com/rabbitmq-dotnet-client/rev/82f54d63fd33
Nightly builds can be downloaded from http://www.rabbitmq.com/nightly-builds.html

@hyperthunk
Copy link
Contributor

Guys, can we close this issue now then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants