summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-05-08 02:51:00 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-05-08 02:51:00 +0000
commit1b9d7ae3110827a0e6a4e2a12197b794948c627e (patch)
treef32c6ed4d0122f2adff8fbd92ac7406b6d9cd3cc /src/lib
parent08f263a45a9f7d7b0f0799eceb0f605dd7f21ee4 (diff)
downloadbcfg2-1b9d7ae3110827a0e6a4e2a12197b794948c627e.tar.gz
bcfg2-1b9d7ae3110827a0e6a4e2a12197b794948c627e.tar.bz2
bcfg2-1b9d7ae3110827a0e6a4e2a12197b794948c627e.zip
SSL: shut sockets down gracefully
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5213 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/SSLServer.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/SSLServer.py b/src/lib/SSLServer.py
index a747c83a1..1c08786a2 100644
--- a/src/lib/SSLServer.py
+++ b/src/lib/SSLServer.py
@@ -172,7 +172,6 @@ class XMLRPCRequestHandler (SimpleXMLRPCServer.SimpleXMLRPCRequestHandler):
L.append(self.rfile.read(chunk_size))
size_remaining -= len(L[-1])
data = ''.join(L)
-
response = self.server._marshaled_dispatch(self.client_address, data)
except:
raise
@@ -186,9 +185,14 @@ class XMLRPCRequestHandler (SimpleXMLRPCServer.SimpleXMLRPCRequestHandler):
self.end_headers()
self.wfile.write(response)
- # shut down the connection
+ def finish(self):
+ # shut down the connection
+ if not self.wfile.closed:
self.wfile.flush()
- self.connection.shutdown(1)
+ self.wfile.close()
+ self.rfile.close()
+ self.connection.unwrap()
+ self.connection.shutdown(1)
class XMLRPCServer (SocketServer.ThreadingMixIn, SSLServer,