Skip to content

Instantly share code, notes, and snippets.

@danielgustafsson
Created August 30, 2016 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielgustafsson/1ac80c0354ebb973ffe5a7e21ae7ce2c to your computer and use it in GitHub Desktop.
Save danielgustafsson/1ac80c0354ebb973ffe5a7e21ae7ce2c to your computer and use it in GitHub Desktop.
diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c
index 389891d..45f9016 100644
--- a/src/backend/libpq/be-secure-openssl.c
+++ b/src/backend/libpq/be-secure-openssl.c
@@ -615,11 +615,8 @@ be_tls_write(Port *port, void *ptr, size_t len, int *waitfor)
break;
case SSL_ERROR_SYSCALL:
/* leave it to caller to ereport the value of errno */
- if (n != -1)
- {
- errno = ECONNRESET;
- n = -1;
- }
+ errno = ECONNRESET;
+ n = -1;
break;
case SSL_ERROR_SSL:
ereport(COMMERROR,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment