klaatu01 commented on code in PR #412:
URL: 
https://github.com/apache/pulsar-client-node/pull/412#discussion_r2079420250


##########
src/Client.cc:
##########
@@ -138,7 +138,9 @@ Client::Client(const Napi::CallbackInfo &info) : 
Napi::ObjectWrap<Client>(info)
   if (clientConfig.Has(CFG_AUTH) && clientConfig.Get(CFG_AUTH).IsObject()) {
     Napi::Object obj = clientConfig.Get(CFG_AUTH).ToObject();
     if (obj.Has(CFG_AUTH_PROP) && obj.Get(CFG_AUTH_PROP).IsObject()) {
-      Authentication *auth = 
Authentication::Unwrap(obj.Get(CFG_AUTH_PROP).ToObject());
+      this->authRef_ = 
Napi::Persistent(obj.Get(CFG_AUTH_PROP).As<Napi::Object>());
+      this->authRef_.SuppressDestruct();

Review Comment:
   If that's the case then perhaps removing that for the logger object will 
also stop that other open handle.
   
   I am away this weekend, but will give this a go when I'm back. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to