changeset 387:eaaf0d2fea8d HEAD

We didn't destroy the ssl connection after error in send.
author Timo Sirainen <tss@iki.fi>
date Wed, 09 Oct 2002 02:20:09 +0300
parents fec256b5f3fd
children 792fc5b3daa4
files src/login/ssl-proxy.c
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/login/ssl-proxy.c	Wed Oct 09 02:18:12 2002 +0300
+++ b/src/login/ssl-proxy.c	Wed Oct 09 02:20:09 2002 +0300
@@ -82,13 +82,12 @@
 	if (!gnutls_error_is_fatal(sent))
 		return 0;
 
-	if (sent == GNUTLS_E_PUSH_ERROR || sent == GNUTLS_E_INVALID_SESSION) {
-		/* disconnected */
-		return -1;
+	/* don't warn about errors related to unexpected disconnection */
+	if (sent != GNUTLS_E_PUSH_ERROR && sent != GNUTLS_E_INVALID_SESSION) {
+		/* error occured */
+		i_warning("Error sending to SSL client: %s",
+			  gnutls_strerror(sent));
 	}
-
-	/* error occured */
-	i_warning("Error sending to SSL client: %s", gnutls_strerror(sent));
 	ssl_proxy_destroy(proxy);
 	return -1;
 }