MCPcopy Create free account
hub / github.com/apache/brpc / ConductError

Method ConductError

src/brpc/socket.cpp:1576–1594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1574}
1575
1576int Socket::ConductError(bthread_id_t id_wait) {
1577 pthread_mutex_lock(&_id_wait_list_mutex);
1578 if (Failed()) {
1579 const int error_code = non_zero_error_code();
1580 if (id_wait != INVALID_BTHREAD_ID) {
1581 const std::string error_text = _error_text;
1582 pthread_mutex_unlock(&_id_wait_list_mutex);
1583 bthread_id_error2(id_wait, error_code, error_text);
1584 return 0;
1585 } else {
1586 pthread_mutex_unlock(&_id_wait_list_mutex);
1587 errno = error_code;
1588 return -1;
1589 }
1590 } else {
1591 pthread_mutex_unlock(&_id_wait_list_mutex);
1592 return 1;
1593 }
1594}
1595
1596X509* Socket::GetPeerCertificate() const {
1597 if (ssl_state() != SSL_CONNECTED) {

Callers

nothing calls this directly

Calls 3

pthread_mutex_lockFunction · 0.85
non_zero_error_codeFunction · 0.85
pthread_mutex_unlockFunction · 0.85

Tested by

no test coverage detected