{auto} improve the tagger destructor to also unset the onAck() and onNack() callbacks
This commit is contained in:
parent
c93f2d89ac
commit
b893755293
|
|
@ -45,6 +45,15 @@ Tagger::~Tagger()
|
|||
{
|
||||
// restore the error-callback
|
||||
_implementation->onError(nullptr);
|
||||
|
||||
// also unset the callbacks for onAck and onNack
|
||||
auto *deferred = _implementation->confirm();
|
||||
|
||||
// unlikely case that the onAck and onNack are not set
|
||||
if (deferred == nullptr) return;
|
||||
|
||||
// unset the callbacks
|
||||
deferred->onAck(nullptr).onNack(nullptr);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue