mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-04-20 22:13:48 +00:00
Ignore contacts with self public key in contact handling
This commit is contained in:
parent
ed12f1b058
commit
d5f19051b2
1 changed files with 8 additions and 0 deletions
|
|
@ -3766,6 +3766,14 @@ class MeshCoreConnector extends ChangeNotifier {
|
|||
void _handleContact(Uint8List frame, {bool isContact = true}) {
|
||||
final contactTmp = Contact.fromFrame(frame);
|
||||
if (contactTmp != null) {
|
||||
if (listEquals(contactTmp.publicKey, _selfPublicKey)) {
|
||||
appLogger.info(
|
||||
'Ignoring contact with self public key: ${contactTmp.name}',
|
||||
tag: 'Connector',
|
||||
);
|
||||
removeContact(contactTmp);
|
||||
return;
|
||||
}
|
||||
final contact = getFromDiscovered(contactTmp);
|
||||
_handleDiscovery(contact, frame, noNotify: true, addActive: true);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue