summaryrefslogtreecommitdiff
path: root/addons/fetchmail
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-08-06 16:09:19 +0200
committerChristophe Simonis <chs@odoo.com>2015-08-06 16:09:19 +0200
commit95ac2cfd10f66d1ad0d5a369f62ee8af72b6f7c8 (patch)
tree9078494e7b3d3d57cb5e59b9ac455f424975bccd /addons/fetchmail
parentf62cfd29803725bd755c353853d0313f4237f9e0 (diff)
parentbe58335f7f6bf727210e60accf67a47b98c17042 (diff)
[MERGE] forward port of branch saas-6 up to be58335
Diffstat (limited to 'addons/fetchmail')
-rw-r--r--addons/fetchmail/fetchmail.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py
index a98330d8f6e..66fe3aaa9f8 100644
--- a/addons/fetchmail/fetchmail.py
+++ b/addons/fetchmail/fetchmail.py
@@ -24,6 +24,7 @@ from openerp.exceptions import UserError
_logger = logging.getLogger(__name__)
MAX_POP_MESSAGES = 50
+MAIL_TIMEOUT = 60
# Workaround for Python 2.7.8 bug https://bugs.python.org/issue23906
poplib._MAXLINE = 65536
@@ -137,6 +138,8 @@ openerp_mailgate: "|/path/to/openerp-mailgate.py --host=localhost -u %(uid)d -p
#connection.user("recent:"+server.user)
connection.user(server.user)
connection.pass_(server.password)
+ # Add timeout on socket
+ connection.sock.settimeout(MAIL_TIMEOUT)
return connection
def button_confirm_login(self, cr, uid, ids, context=None):