| 7639 | } |
| 7640 | |
| 7641 | inline void ssl_delete(std::mutex &ctx_mutex, SSL *ssl, |
| 7642 | bool shutdown_gracefully) { |
| 7643 | // sometimes we may want to skip this to try to avoid SIGPIPE if we know |
| 7644 | // the remote has closed the network connection |
| 7645 | // Note that it is not always possible to avoid SIGPIPE, this is merely a |
| 7646 | // best-efforts. |
| 7647 | if (shutdown_gracefully) { SSL_shutdown(ssl); } |
| 7648 | |
| 7649 | std::lock_guard<std::mutex> guard(ctx_mutex); |
| 7650 | SSL_free(ssl); |
| 7651 | } |
| 7652 | |
| 7653 | template <typename U> |
| 7654 | bool ssl_connect_or_accept_nonblocking(socket_t sock, SSL *ssl, |
no outgoing calls
no test coverage detected