Created
October 19, 2012 13:21
-
-
Save mxposed/3918196 to your computer and use it in GitHub Desktop.
Update endpoint bug proof
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::vector<cocaine_endpoint_t> new_endpoints; | |
std::vector<cocaine_endpoint_t> missing_endpoints2; | |
get_endpoints_diff(endpoints, new_endpoints, missing_endpoints); | |
if (!missing_endpoints.empty()) { | |
for (size_t i = 0; i < m_endpoints.size(); ++i) { | |
if (false == std::binary_search(endpoints_tmp.begin(), endpoints_tmp.end(), m_endpoints[i])) { | |
missing_endpoints2.push_back(m_endpoints[i]); | |
} | |
} | |
log(PLOG_DEBUG, "missing %d endpoints", missing_endpoints.size()); | |
log(PLOG_DEBUG, "missing %d endpoints on sorted", missing_endpoints2.size()); | |
if (log_flag_enabled(PLOG_DEBUG)) { | |
log(PLOG_DEBUG, "missing endpoints on " + m_socket_identity); | |
} | |
recreate_socket(); | |
connect(endpoints); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code produces the following logs