diff --git a/rhn/connections.py b/rhn/connections.py
index d615a8c..6a1ea1d 100644
--- a/rhn/connections.py
+++ b/rhn/connections.py
@@ -15,7 +15,6 @@ import httplib
import xmlrpclib
import encodings.idna
import socket
-import errno
from platform import python_version
# Import into the local namespace some httplib-related names
@@ -170,13 +169,16 @@ class HTTPSConnection(HTTPConnection):
af, socktype, proto, canonname, sa = r
try:
sock = socket.socket(af, socktype, proto)
+ except socket.error, msg:
+ sock = None
+ continue
+
+ try:
sock.connect((self.host, self.port))
sock.settimeout(self.timeout)
- except socket.error:
- e = sys.exc_info()[1]
- if e.errno != errno.EINTR:
- sock.close()
- sock = None
+ except socket.error, e:
+ sock.close()
+ sock = None
continue
break
diff --git a/rhnlib.spec b/rhnlib.spec
index 57e2128..36543c0 100644
--- a/rhnlib.spec
+++ b/rhnlib.spec
@@ -5,7 +5,7 @@ Name: rhnlib
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
Version: 2.5.65
-Release: 5%{?dist}
+Release: 6%{?dist}
Group: Development/Libraries
License: GPLv2
@@ -59,6 +59,10 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/*
%changelog
+* Mon Oct 09 2017 Tomas Kasparek <tkasparek@redhat.com> 2.5.65-6
+- Resolves: #1499794 - revert previous reboot loop changes
+ (tkasparek@redhat.com)
+
* Thu Sep 21 2017 Tomas Kasparek <tkasparek@redhat.com> 2.5.65-5
- Resolves: #1471045 - check a state of handshake before shutdown SSL
connection (grinrag@gmail.com)