summaryrefslogtreecommitdiffstats
path: root/src/lib/SSLServer.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2010-08-11 14:53:28 +0000
committerSol Jerome <sol.jerome@gmail.com>2010-08-11 15:59:59 -0500
commit28f2ca52c6977ea6ebf024254e48c66412c9ffb4 (patch)
treea7e5887c189c1b93448b2770ddc07c9992fb5f0e /src/lib/SSLServer.py
parent53d1576a52febdc6f8af069deb30e614a91dee4c (diff)
downloadbcfg2-28f2ca52c6977ea6ebf024254e48c66412c9ffb4.tar.gz
bcfg2-28f2ca52c6977ea6ebf024254e48c66412c9ffb4.tar.bz2
bcfg2-28f2ca52c6977ea6ebf024254e48c66412c9ffb4.zip
SSLServer: handle socket errors on shutdown gracefully (Resolves #907 and #909)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@6011 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/SSLServer.py')
-rw-r--r--src/lib/SSLServer.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/SSLServer.py b/src/lib/SSLServer.py
index ed8e5e405..7c5b76664 100644
--- a/src/lib/SSLServer.py
+++ b/src/lib/SSLServer.py
@@ -139,8 +139,14 @@ class SSLServer (SocketServer.TCPServer, object):
return sslsock, sockinfo
def close_request(self, request):
- request.unwrap()
- request.close()
+ try:
+ request.unwrap()
+ except:
+ pass
+ try:
+ request.close()
+ except:
+ pass
def _get_url(self):
port = self.socket.getsockname()[1]