mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-09-03 20:52:56 -05:00
Close connection after each request, avoid NSS shutdown problem.
The unit tests were failing when executed against an Apache server in F-18 due to dangling references causing NSS shutdown to fail. https://fedorahosted.org/freeipa/ticket/3180
This commit is contained in:
@@ -238,6 +238,12 @@ class NSSConnection(httplib.HTTPConnection, NSSAddressFamilyFallback):
|
||||
def connect(self):
|
||||
self.connect_socket(self.host, self.port)
|
||||
|
||||
def close(self):
|
||||
"""Close the connection to the HTTP server."""
|
||||
if self.sock:
|
||||
self.sock.close() # close it manually... there may be other refs
|
||||
self.sock = None
|
||||
|
||||
def endheaders(self, message=None):
|
||||
"""
|
||||
Explicitly close the connection if an error is returned after the
|
||||
|
||||
Reference in New Issue
Block a user