Files
odoo_source/addons/fetchmail
Jairo Llopis abb1a69ad4 [FIX] mail: Properly set socket timeout
The connection socket is initialized before actually creating the connection object. This means that setting the socket timeout after connecting to server could still lead to an endless connection if a timeout is produced while connecting.

To fix this problem, I opened https://bugs.python.org/issue38615 (which explains the problem in `imaplib` itself) and I publish here the workaround.

`poplib` supports setting the timeout before initializing the connection, so it's used instead of the workaround.

@Tecnativa TT20364

closes odoo/odoo#89717

X-original-commit: e0d7dffe167b642f14fdc207ebd80fafb1d82e3d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-04-27 07:52:02 +02:00
..
…
…