Skip to content

Catch ObjectDisposedException case #757

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

Merged
merged 1 commit into from
Mar 12, 2020

Conversation

lukebakken
Copy link
Collaborator

@lukebakken lukebakken commented Mar 12, 2020

Prevent this exception from happening:

√ TestUnthrottledFloodPublishing [3m 5s]
Test run in progress...
The active test run was aborted. Reason: Test host process crashed : Unhandled Exception: System.ObjectDisposedException: Cannot access a disposed object.
   at System.Threading.TimerQueueTimer.Change(UInt32 dueTime, UInt32 period)
   at RabbitMQ.Client.Framing.Impl.Connection.HeartbeatWriteTimerCallback(Object state) in /tmp/build/a94a8fe5/rabbitmq_dotnet_client/projects/client/RabbitMQ.Client/src/client/impl/Connection.cs:line 1140
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.TimerQueueTimer.CallCallback()
   at System.Threading.TimerQueueTimer.Fire()
   at System.Threading.TimerQueue.FireNextTimers()

Prevent this exception from happening:

```
√ TestUnthrottledFloodPublishing [3m 5s]
Test run in progress..................................................................                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The active test run was aborted. Reason: Test host process crashed : Unhandled Exception: System.ObjectDisposedException: Cannot access a disposed object.
   at System.Threading.TimerQueueTimer.Change(UInt32 dueTime, UInt32 period)
   at RabbitMQ.Client.Framing.Impl.Connection.HeartbeatWriteTimerCallback(Object state) in /tmp/build/a94a8fe5/rabbitmq_dotnet_client/projects/client/RabbitMQ.Client/src/client/impl/Connection.cs:line 1140
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.TimerQueueTimer.CallCallback()
   at System.Threading.TimerQueueTimer.Fire()
   at System.Threading.TimerQueue.FireNextTimers()
```
@lukebakken lukebakken added this to the 6.0.0 milestone Mar 12, 2020
@lukebakken lukebakken self-assigned this Mar 12, 2020
@lukebakken lukebakken merged commit 313e1e8 into master Mar 12, 2020
@lukebakken lukebakken deleted the lrb-fix-timer-disposed-exception branch March 12, 2020 23:43
lukebakken added a commit that referenced this pull request Mar 13, 2020
Catch ObjectDisposedException case

(cherry picked from commit 313e1e8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant