# HG changeset patch # User Kim Alvefur # Date 1339199251 -7200 # Node ID d9a4e2f11b07023c4671a286b9755d7cad6f9617 # Parent f987c7b7900879c4c0a525ae7a176eef35d07d51 mod_auth_dovecot: If the connection fails, nuke it so the next attempt causes a reconnect. diff -r f987c7b79008 -r d9a4e2f11b07 mod_auth_dovecot/auth_dovecot/sasl_dovecot.lib.lua --- a/mod_auth_dovecot/auth_dovecot/sasl_dovecot.lib.lua Fri Jun 08 21:02:41 2012 +0200 +++ b/mod_auth_dovecot/auth_dovecot/sasl_dovecot.lib.lua Sat Jun 09 01:47:31 2012 +0200 @@ -135,6 +135,9 @@ local ok, err = self.conn:send(msg); if not ok then log("error", "Could not write to socket: %s", err); + if err == "closed" then + conn = nil; + end return nil, err; end return true; @@ -145,6 +148,9 @@ local line, err = self.conn:receive(); if not line then log("error", "Could not read from socket: %s", err); + if err == "closed" then + conn = nil; + end return nil, err; end module:log("debug", "received %q", line);