aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorLauri Nurmi <lanurmi@iki.fi>2018-03-18 23:11:17 +0200
committerLauri Nurmi <lanurmi@iki.fi>2018-03-18 23:11:17 +0200
commit4c2d5b3bb5f3a142cbd0ef95e41a8f807fe691f4 (patch)
tree86b98c5978513ccca236be0467d7ecd79d568378 /fetchmail.c
parenta9b253b3aa0a34696d24b2d85129d8a1f613b483 (diff)
downloadfetchmail-4c2d5b3bb5f3a142cbd0ef95e41a8f807fe691f4.tar.gz
fetchmail-4c2d5b3bb5f3a142cbd0ef95e41a8f807fe691f4.tar.bz2
fetchmail-4c2d5b3bb5f3a142cbd0ef95e41a8f807fe691f4.zip
Do not continue autoprobing other protocols after socket error
If e.g. fetching with IMAP and --idle fails with a socket error, returning PS_SOCKET, do not try fetching with a different protocol (e.g. POP3). POP3 might have a completely different idea of read and unread messages than IMAP, which causes already seen messages to be re-fetched.
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fetchmail.c b/fetchmail.c
index 6d9dfb87..a8a2dc29 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -1525,7 +1525,7 @@ static int query_host(struct query *ctl)
st = query_host(ctl);
} while
(st == PS_REPOLL);
- if (st == PS_SUCCESS || st == PS_NOMAIL || st == PS_AUTHFAIL || st == PS_LOCKBUSY || st == PS_SMTP || st == PS_MAXFETCH || st == PS_DNS)
+ if (st == PS_SUCCESS || st == PS_NOMAIL || st == PS_SOCKET || st == PS_AUTHFAIL || st == PS_LOCKBUSY || st == PS_SMTP || st == PS_MAXFETCH || st == PS_DNS)
break;
}
ctl->server.protocol = P_AUTO;