summaryrefslogtreecommitdiffstats
path: root/saslauthd
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-03 16:18:12 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-03 16:20:21 +0000
commit72da10f4ccb5de84accf71dd5e22eaedde586947 (patch)
tree59cd61b5f3357c9580c574e5ff847824850fc755 /saslauthd
parent171fbba960ab71675cade960beefd1a6a805b3a7 (diff)
downloadpykolab-72da10f4ccb5de84accf71dd5e22eaedde586947.tar.gz
Catch Broken Pipe error (#1170)
Diffstat (limited to 'saslauthd')
-rw-r--r--saslauthd/__init__.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/saslauthd/__init__.py b/saslauthd/__init__.py
index 84024e3..edbca94 100644
--- a/saslauthd/__init__.py
+++ b/saslauthd/__init__.py
@@ -195,9 +195,17 @@ class SASLAuthDaemon(object):
auth.connect()
if auth.authenticate(login):
- clientsocket.send(struct.pack("!H2s", 2, "OK"))
+ # #1170: Catch broken pipe error (incomplete authentication request)
+ try:
+ clientsocket.send(struct.pack("!H2s", 2, "OK"))
+ except:
+ pass
else:
- clientsocket.send(struct.pack("!H2s", 2, "NO"))
+ # #1170: Catch broken pipe error (incomplete authentication request)
+ try:
+ clientsocket.send(struct.pack("!H2s", 2, "NO"))
+ except:
+ pass
clientsocket.close()