Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/114#discussion_r123501069
  
    --- Diff: libminifi/src/Site2SiteClientProtocol.cpp ---
    @@ -319,6 +344,64 @@ void Site2SiteClientProtocol::tearDown() {
       _peerState = IDLE;
     }
     
    +bool 
Site2SiteClientProtocol::getPeerList(std::vector<minifi::Site2SitePeerStatus> 
&peer) {
    +  if (establish() && handShake()) {
    +    int status = this->writeRequestType(REQUEST_PEER_LIST);
    +
    +    if (status <= 0) {
    +      tearDown();
    +      return false;
    +    }
    +
    +    uint32_t number;
    +    status = peer_->read(number);
    +
    +    if (status <= 0) {
    +      tearDown();
    +      return false;
    +    }
    +
    +    for (int i = 0; i < number; i++) {
    --- End diff --
    
    Does it make sense to have a limit on number so we don't have a virtual DoS?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to