PyOpenSSL will raise an EPIPE exception if the connection was already closed when shutdown() is called.