Skip to content

Commit

Permalink
fix(eventstream): move callback data shutdown into ClientContinuation…
Browse files Browse the repository at this point in the history
… destructor (#437)
  • Loading branch information
MikeDombo authored May 25, 2022
1 parent 4492d28 commit 7ff4354
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions eventstream_rpc/source/EventStreamClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -871,18 +871,15 @@ namespace Aws
}
if (m_callbackData != nullptr)
{
{
const std::lock_guard<std::mutex> lock(m_callbackData->callbackMutex);
m_callbackData->continuationDestroyed = true;
}
Crt::Delete<ContinuationCallbackData>(m_callbackData, m_allocator);
}
}

ClientContinuationHandler::~ClientContinuationHandler() noexcept
{
if (m_callbackData)
{
const std::lock_guard<std::mutex> lock(m_callbackData->callbackMutex);
m_callbackData->continuationDestroyed = true;
}
}
ClientContinuationHandler::~ClientContinuationHandler() noexcept {}

void ClientContinuation::s_onContinuationMessage(
struct aws_event_stream_rpc_client_continuation_token *continuationToken,
Expand Down

0 comments on commit 7ff4354

Please sign in to comment.