spark-500. Don't throw out the client just because we unsubscribe one subscription.

This commit is contained in:
Eric Harding committed 2018-02-16 09:35:08 -05:00
1 parent 749f8e8fb4
commit 026e0686be
1 file changed
+2 -3
@@ -80,9 +80,8 @@ namespace bts.api.core {
};
var subscription = ApiNativeMethods.api_client_subscribe(_client, method_and_qualifier, cb, IntPtr.Zero);
return FinalizeableAnonymousDisposable.Create((disposing) => {
IntPtr temp = _client;
_client = IntPtr.Zero;
ApiNativeMethods.api_client_unsubscribe(temp, subscription);
ApiNativeMethods.api_client_unsubscribe(_client, subscription);
subscription = IntPtr.Zero;
// keepalive
cb = null;
if (!disposing) {