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:
System.IO.IOException: "Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."
System.Net.Sockets.SocketException: "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"
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:
System.IO.IOException: "Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."
System.Net.Sockets.SocketException: "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"