chancache

fix crash on shutdown
This commit is contained in:
Michael Davidsaver
2016-03-30 11:50:59 +09:00
parent 126b36cc0a
commit 8f2167497f

View File

@ -98,7 +98,14 @@ ChannelCacheEntry::CRequester::channelStateChange(pva::Channel::shared_pointer c
FOREACH(it, end, interested)
{
(*it)->requester->channelStateChange(*it, connectionState);
GWChannel *chan = it->get();
pva::ChannelRequester::shared_pointer req;
{
Guard G(chan->entry->mutex());
req = chan->requester;
}
if(req)
req->channelStateChange(*it, connectionState);
}
}