Skip to content

Commit

Permalink
NCBC-908: Fix connection leak on Memcached bucket dispose
Browse files Browse the repository at this point in the history
Motivation
----------
Memcached buckets are using HttpStreamingProvider for Couchbase server
node configuration. This implementation did not properly Dispose
underlying ConnectionPools instances.

Modifications
-------------
Dipose is now called on the IConfigInfo implementation after it is released.

Result
------
Memcached buckets no longer leak resources.

Change-Id: Ia88a6f220e76ebda9dc2ae68ff4064eabc57cb6f
Reviewed-on: http://review.couchbase.org/51512
Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
  • Loading branch information
Vojta Jakubec authored and jeffrymorris committed May 28, 2015
1 parent b0896a5 commit 93b98a9
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ public override void UnRegisterObserver(IConfigObserver observer)
IConfigInfo configInfo;
if (Configs.TryRemove(observer.Name, out configInfo))
{
configInfo.Dispose();
Log.Info(m => m("Removing config for {0}", observer.Name));
}
}
Expand Down

0 comments on commit 93b98a9

Please sign in to comment.