mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Broadcast discovery act smarter when a friend is discovered
This commit is contained in:
parent
a7498371a2
commit
7eaa7d8c8c
@ -165,7 +165,14 @@ void BroadcastDiscoveryService::data_tick()
|
||||
RsBroadcastDiscoveryResult rbdr =
|
||||
createResult(pp.first, pp.second);
|
||||
|
||||
mRsPeers.addPeerLocator(rbdr.mSslId, rbdr.locator);
|
||||
if( rbdr.locator.hasPort() && mRsPeers.isFriend(rbdr.mSslId) &&
|
||||
!mRsPeers.isOnline(rbdr.mSslId) )
|
||||
{
|
||||
mRsPeers.setLocalAddress(
|
||||
rbdr.mSslId, rbdr.locator.host(),
|
||||
rbdr.locator.port() );
|
||||
mRsPeers.connectAttempt(rbdr.mSslId);
|
||||
}
|
||||
|
||||
for( const timedDiscHandlers_t& evtHandler :
|
||||
mPeersDiscoveredEventHandlersList ) evtHandler.first(rbdr);
|
||||
|
Loading…
Reference in New Issue
Block a user