Refactor InternalPoolImpl so that NRE is not thrown.

Description

https://github.com/couchbase/couchbase-net-client/pull/14
http://www.couchbase.com/communities/q-and-a/nullreferenceexception-memcachednodeinternalpoolimpl

NullReferenceException at MemcachedNode+InternalPoolImpl.<Dispose>

I recently updated to Couchbase Client Library .NET 1.3.4 and I've been experiencing daily incidences of the following NullReferenceException:

System.NullReferenceException
Stack:
at Enyim.Caching.Memcached.MemcachedNode+InternalPoolImpl.b__7(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireNextTimers()

The exception is particularly problematic because it appears to happen within the Timer callback here: https://github.com/couchbase/couchbase-net-client/blob/master/src/Enyim.... which means that it bubbles up as an AppDomain.CurrentDomain.UnhandledException and terminates my process

I'm going to enable logging as described here (http://docs.couchbase.com/couchbase-sdk-net-1.3/#configuring-logging) in hopes that I get some more information to go on

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:

Jeffry Morris June 4, 2014 at 11:04 PM

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Sprint

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created June 2, 2014 at 6:59 PM
Updated June 4, 2014 at 11:04 PM
Resolved June 4, 2014 at 11:04 PM
Instabug