eclipse / paho.mqtt.cpp

Other
1.02k stars 435 forks source link

seg fault using shared pointer to an async mqtt client #146

Closed saumilagg closed 6 years ago

saumilagg commented 6 years ago

Hi @fpagliughi ,

I am using a mqtt::async_client_ptr in my code and publishing the message accordingly. However, my code is crashing in the end with a SEG fault from async_client.cpp file.

After debugging I saw that in function remove_token(token *tok), the call cb->delivery_complete(dtok) is causing this. Could you help me out figuring this issue? I think maybe I am not initializing the pointer correctly? Any examples using this smart pointer?

This is how I am initializing: clientPtr = std::make_shared(tempStr,sn);

But I guess copy, move constructors are deleted!!

fpagliughi commented 6 years ago

Moving the conversation to #141