[0.2.1] Fixed follow-on bug (from a previous revision) where return values would always become orphaned.

This commit is contained in:
Tim Ambrogi 2022-03-11 12:05:21 -05:00
parent 4d989423b0
commit 618997bf87
3 changed files with 9 additions and 3 deletions

View File

@ -837,8 +837,11 @@ public:
void OnTaskPromiseDestroyed() void OnTaskPromiseDestroyed()
{ {
// Mark the return value as orphaned if it was never set // Mark the return value as orphaned if it was never set
if (m_retValState == eTaskRetValState::Unset)
{
m_retValState = eTaskRetValState::Orphaned; m_retValState = eTaskRetValState::Orphaned;
} }
}
private: private:
// Internal state // Internal state

View File

@ -3,7 +3,7 @@
// Squid::Tasks version (major.minor.patch) // Squid::Tasks version (major.minor.patch)
#define SQUID_TASKS_VERSION_MAJOR 0 #define SQUID_TASKS_VERSION_MAJOR 0
#define SQUID_TASKS_VERSION_MINOR 2 #define SQUID_TASKS_VERSION_MINOR 2
#define SQUID_TASKS_VERSION_PATCH 0 #define SQUID_TASKS_VERSION_PATCH 1
/// @defgroup Config Configuration /// @defgroup Config Configuration
/// @brief Configuration settings for the Squid::Tasks library /// @brief Configuration settings for the Squid::Tasks library

View File

@ -852,8 +852,11 @@ public:
void OnTaskPromiseDestroyed() void OnTaskPromiseDestroyed()
{ {
// Mark the return value as orphaned if it was never set // Mark the return value as orphaned if it was never set
if (m_retValState == eTaskRetValState::Unset)
{
m_retValState = eTaskRetValState::Orphaned; m_retValState = eTaskRetValState::Orphaned;
} }
}
private: private:
// Internal state // Internal state