summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2010-03-13 16:10:28 +0000
committerSol Jerome <solj@ices.utexas.edu>2010-03-13 11:14:51 -0600
commit181dc3d8e47873f728f95cbb57097852f43677e7 (patch)
treed88b99fb84e33882db54a5bca72926825ce07aa4 /src
parentaab798ccfb9d4e04634181780627c94cb66a5e53 (diff)
downloadbcfg2-181dc3d8e47873f728f95cbb57097852f43677e7.tar.gz
bcfg2-181dc3d8e47873f728f95cbb57097852f43677e7.tar.bz2
bcfg2-181dc3d8e47873f728f95cbb57097852f43677e7.zip
SSLServer: add in transaction timeouts
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5762 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/SSLServer.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/SSLServer.py b/src/lib/SSLServer.py
index c3ecbdea5..fac332f14 100644
--- a/src/lib/SSLServer.py
+++ b/src/lib/SSLServer.py
@@ -203,6 +203,11 @@ class XMLRPCRequestHandler (SimpleXMLRPCServer.SimpleXMLRPCRequestHandler):
size_remaining = int(self.headers["content-length"])
L = []
while size_remaining:
+ try:
+ select.select([self.rfile.fileno()], [], [], 3)
+ except select.error:
+ print "got select timeout"
+ raise
chunk_size = min(size_remaining, max_chunk_size)
L.append(self.rfile.read(chunk_size))
size_remaining -= len(L[-1])