+1 vote

You write something of cancelation token support added, but I don't find any. Can you tell me where I can find this?

I hoped one can stop the imapIdle function with it, because the Timeout does not work.

FolderStatus state = await imapClient.IdleAsync(
    TimeSpan.FromSeconds(10));
ago by

1 Answer

0 votes
 
Best answer

Imap.Idle method's timeout parameter specifies the interval at which IDLE command is resend.

It is needed so connection is not terminated by network infrastructure due to lack of traffic.

Imap.Idle method is blocking, you use Imap.StopIdle (usually on a different thread) to stop waiting for notifications.

You can find more details here:
https://www.limilabs.com/blog/imap-idle

Cancellation token support is present for all other methods on Imap, Pop3 and Smtp clients.

ago by (302k points)
...