diff --git a/NEWS b/NEWS index fecd6ad5..7e633af2 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ 0.163 + - fix hanging connections for some user (boo#1068470) - add sendsysrq command (requires OBS 2.10) 0.162.1 diff --git a/osc/oscssl.py b/osc/oscssl.py index 7aa5a0d8..78254f20 100644 --- a/osc/oscssl.py +++ b/osc/oscssl.py @@ -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)