fixed remanent bug due causing the deletion of rsEvent

This commit is contained in:
csoler 2019-09-10 21:59:25 +02:00
parent 3a58aa468f
commit bbf92bd5f3
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

@ -760,9 +760,8 @@ bool p3ServiceControl::updateFilterByPeer_locked(const RsPeerId &peerId)
recordFilterChanges_locked(peerId, originalFilter, peerFilter);
using Evt_t = RsPeerStateChangedEvent;
std::shared_ptr<RsEvents> lockedRsEvents ( rsEvents );
if(lockedRsEvents)
lockedRsEvents->postEvent(std::unique_ptr<Evt_t>(new Evt_t(peerId)));
if(rsEvents)
rsEvents->postEvent(std::unique_ptr<Evt_t>(new Evt_t(peerId)));
return true;
}