From: Tom Lane Date: Fri, 18 May 2007 01:20:48 +0000 (+0000) Subject: Remove redundant logging of send failures when SSL is in use. While pqcomm.c X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/?a=commitdiff_plain;h=016f8d1f421e6a3f980e2a65e6c825a2975eba16;p=users%2Fbernd%2Fpostgres.git Remove redundant logging of send failures when SSL is in use. While pqcomm.c had been taught not to do that ages ago, the SSL code was helpfully bleating anyway. Resolves some recent reports such as bug #3266; however the underlying cause of the related bug #2829 is still unclear. --- diff --git a/src/backend/libpq/be-secure.c b/src/backend/libpq/be-secure.c index 2af8698513..e6cc1827b7 100644 --- a/src/backend/libpq/be-secure.c +++ b/src/backend/libpq/be-secure.c @@ -269,15 +269,9 @@ rloop: case SSL_ERROR_WANT_WRITE: goto rloop; case SSL_ERROR_SYSCALL: - if (n == -1) - ereport(COMMERROR, - (errcode_for_socket_access(), - errmsg("SSL SYSCALL error: %m"))); - else + /* leave it to caller to ereport the value of errno */ + if (n != -1) { - ereport(COMMERROR, - (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("SSL SYSCALL error: EOF detected"))); errno = ECONNRESET; n = -1; } @@ -360,15 +354,9 @@ wloop: case SSL_ERROR_WANT_WRITE: goto wloop; case SSL_ERROR_SYSCALL: - if (n == -1) - ereport(COMMERROR, - (errcode_for_socket_access(), - errmsg("SSL SYSCALL error: %m"))); - else + /* leave it to caller to ereport the value of errno */ + if (n != -1) { - ereport(COMMERROR, - (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("SSL SYSCALL error: EOF detected"))); errno = ECONNRESET; n = -1; }