Skip to content

Commit

Permalink
Merge "DiscoveryClient stops resusbcribing even after ttl period." in…
Browse files Browse the repository at this point in the history
…to R2.22.x
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Apr 3, 2016
2 parents 1916565 + a86a888 commit ad7ee75
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/discovery/client/discovery_client.cc
Expand Up @@ -487,11 +487,13 @@ void DiscoveryServiceClient::ReEvaluatePublish(std::string serviceName,
stringstream ss;
impl->PrintDoc(ss);
resp->publish_msg_ = ss.str();

DISCOVERY_CLIENT_TRACE(DiscoveryClientMsg, resp->publish_hdr_,
serviceName, resp->publish_msg_);
}

/* Send publish unconditionally */
DISCOVERY_CLIENT_TRACE(DiscoveryClientMsg, resp->publish_hdr_,
serviceName, resp->publish_msg_);
resp->pub_sent_++;
resp->publish_cb_called_ = false;
SendHttpPostMessage(resp->publish_hdr_, serviceName,
resp->publish_msg_);
}
Expand Down Expand Up @@ -564,6 +566,7 @@ void DiscoveryServiceClient::Publish(std::string serviceName) {

DSPublishResponse *resp = loc->second;
resp->pub_sent_++;
resp->publish_cb_called_ = false;
SendHttpPostMessage(resp->publish_hdr_, serviceName, resp->publish_msg_);

DISCOVERY_CLIENT_TRACE(DiscoveryClientMsg, resp->publish_hdr_,
Expand Down Expand Up @@ -661,6 +664,7 @@ void DiscoveryServiceClient::Subscribe(std::string serviceName, uint8_t numbOfIn
DSResponseHeader *resp = loc->second;
resp->subscribe_timer_->Cancel();
resp->sub_sent_++;
resp->subscribe_cb_called_ = false;
SendHttpPostMessage("subscribe", serviceName, resp->subscribe_msg_);
}
}
Expand Down

0 comments on commit ad7ee75

Please sign in to comment.