+
+ /* Attempt clean shutdown of the SSL connection. This will work most of
+ * the time, as long as the kernel send buffer has some free space and the
+ * SSL connection isn't renegotiating, etc. That has to be good enough,
+ * since we don't have any way to continue the close operation in the
+ * background. */
+ SSL_shutdown(sslv->ssl);
+