is_graceful_tls_shutdown

Function is_graceful_tls_shutdown 

Source
pub fn is_graceful_tls_shutdown(err: &Error) -> bool
Expand description

Returns true when an io::Error represents a peer-initiated, graceful TLS shutdown (close_notify), rather than a real I/O failure.

Two cases are recognized:

  • SSL_ERROR_ZERO_RETURN: the peer sent close_notify and we observed it during this I/O call.
  • SSL_R_PROTOCOL_IS_SHUTDOWN: a subsequent write after the session was already shut down (“ssl session has been shut down”).