summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--methods/connect.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/methods/connect.cc b/methods/connect.cc
index f58a67db3..0d4b3e26f 100644
--- a/methods/connect.cc
+++ b/methods/connect.cc
@@ -632,9 +632,9 @@ struct TlsFd : public MethodFd
int Close() APT_OVERRIDE
{
- if (HandleError(gnutls_bye(session, GNUTLS_SHUT_RDWR)) < 0)
- return -1;
- return UnderlyingFd->Close();
+ auto err = HandleError(gnutls_bye(session, GNUTLS_SHUT_RDWR));
+ auto lower = UnderlyingFd->Close();
+ return err < 0 ? HandleError(err) : lower;
}
bool HasPending() APT_OVERRIDE