When a deferred handler is in error state, registering a finalize callback should also cause it to be called immediately

This commit is contained in:
Martijn Otto 2015-06-12 16:48:25 +02:00
parent ce80a971d7
commit 7a11c23f03
1 changed files with 3 additions and 0 deletions

View File

@ -243,6 +243,9 @@ public:
// store callback
_finalizeCallback = callback;
// if the object is already in a failed state, we call the callback right away
if (_failed) callback();
// allow chaining
return *this;
}