Lock when removing disconnect handler

This commit is contained in:
Justin Kotalik 2019-03-14 22:32:10 +00:00
parent 20b596a88b
commit 7569f14dd9
2 changed files with 3 additions and 0 deletions

View File

@ -53,5 +53,6 @@ void DisconnectHandler::SetHandler(std::unique_ptr<IREQUEST_HANDLER, IREQUEST_HA
void DisconnectHandler::RemoveHandler() noexcept
{
SRWExclusiveLock lock(m_handlerLock);
m_pHandler = nullptr;
}

View File

@ -24,6 +24,8 @@ public:
VOID
ReferenceRequestHandler() noexcept override
{
DBG_ASSERT(m_cRefs != 0);
InterlockedIncrement(&m_cRefs);
}