unprotect method

  1. @override
bool unprotect(
  1. PeerId peerId,
  2. String tag
)
override

Removes a protection that may have been placed on a peer, under the specified tag.

The return value indicates whether the peer continues to be protected after this call, by way of a different tag.

Implementation

@override
bool unprotect(PeerId peerId, String tag) {
  final protections = _protections[peerId];
  if (protections != null) {
    protections.remove(tag);
    return protections.isNotEmpty;
  }
  return false;
}