summaryrefslogtreecommitdiff
path: root/addons/fetchmail
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-08-06 11:54:32 +0200
committerChristophe Simonis <chs@odoo.com>2015-08-06 11:54:32 +0200
commit3d26eb02ab2d016479919d2c408cf162835fef31 (patch)
tree40d087decec9b450ef870fac62a0135b3c99d48d /addons/fetchmail
parent4b3f16e0d10270f296d0309636f0932486425f1e (diff)
parentd3e9bde7387da750f80011d7b099b6b421963a0c (diff)
[MERGE] forward port of branch 8.0 up to d3e9bde
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 87bf4ec1e68..877876b57f0 100644
--- a/addons/fetchmail/fetchmail.py
+++ b/addons/fetchmail/fetchmail.py
@@ -42,6 +42,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
@@ -155,6 +156,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):