1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-26 06:46:13 +01:00

handle SSL connection closing ourself as advised in boo#1068470 bye

M2Crypto upstream maintainer.

Should fix hanging connections
This commit is contained in:
Adrian Schröter 2018-02-23 07:31:57 +01:00
parent 6b04a6584b
commit 0ddb598743
2 changed files with 6 additions and 0 deletions

1
NEWS
View File

@ -1,4 +1,5 @@
0.163
- fix hanging connections for some user (boo#1068470)
- add sendsysrq command (requires OBS 2.10)
0.162.1

View File

@ -216,12 +216,17 @@ class myHTTPSHandler(M2Crypto.m2urllib2.HTTPSHandler):
# So make sure the connection gets closed after the (only)
# request.
headers["Connection"] = "close"
# closing connection ourself to avoid hanging connnections: bsc#1068470
#headers["Connection"] = "close"
try:
h.request(req.get_method(), selector, req.data, headers)
s = h.get_session()
if s:
self.saved_session = s
r = h.getresponse()
# close the connection ourselves
h.close()
except socket.error as err: # XXX what error?
err.filename = full_url
raise M2Crypto.m2urllib2.URLError(err)