smiley22 / S22.Imap

A free, easy-to-use and well-documented .NET library component for communicating with IMAP servers
http://smiley22.github.com/S22.Imap/Documentation/
MIT License
211 stars 115 forks source link

Network connection lost while retrieving a mail message #160

Closed eriko-valence closed 3 years ago

eriko-valence commented 4 years ago

An IdleError event is raised (after 20 seconds) if the network connection is lost prior to calling the ImapClient method GetMessage. This event includes exceptions System.IO.IOException & System.Net.Sockets.SocketException (see below).

The problem is that if the network connection is lost while the ImapClient method GetMessage is retrieving a message, this event is not raised (and the exceptions are not thrown). If the network connection is restored within approximately two minutes, this method will recover and finish retrieving the message. Anything more than approximately two minutes, and this method will just hang.

EXCEPTIONS THROWN:

eriko-valence commented 3 years ago

Switched to MailKit