| 7284 | } |
| 7285 | |
| 7286 | inline void ssl_delete(std::mutex &ctx_mutex, SSL *ssl, |
| 7287 | bool shutdown_gracefully) { |
| 7288 | // sometimes we may want to skip this to try to avoid SIGPIPE if we know |
| 7289 | // the remote has closed the network connection |
| 7290 | // Note that it is not always possible to avoid SIGPIPE, this is merely a |
| 7291 | // best-efforts. |
| 7292 | if (shutdown_gracefully) { SSL_shutdown(ssl); } |
| 7293 | |
| 7294 | std::lock_guard<std::mutex> guard(ctx_mutex); |
| 7295 | SSL_free(ssl); |
| 7296 | } |
| 7297 | |
| 7298 | template <typename U> |
| 7299 | bool ssl_connect_or_accept_nonblocking(socket_t sock, SSL *ssl, |
no outgoing calls
no test coverage detected