diff options
| author | Olivier Dony <odo@openerp.com> | 2015-08-04 15:17:12 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2015-08-04 15:17:51 +0200 |
| commit | 733cb3e76f95c21db481e07c02d2af025b9d28fb (patch) | |
| tree | a1cc7f7bd1f9fbbe432ce3c17fe61258835cb8d3 /addons/fetchmail/fetchmail.py | |
| parent | cc5860fbcf86568f2ca7404cf8c47e41357c0f3d (diff) | |
| parent | 8b3d69a0d7bba324ec9022320c547af983546310 (diff) | |
[MERGE] Forward-port from 7.0 up to 8b3d69a0d7bba324ec9022320c547af983546310
Diffstat (limited to 'addons/fetchmail/fetchmail.py')
| -rw-r--r-- | addons/fetchmail/fetchmail.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index 2b652cd8a6b..65e395ae58c 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -41,6 +41,7 @@ from openerp.tools.translate import _ _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 @@ -153,6 +154,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): |
