Closed sevzas closed 12 years ago
Maybe a strange coincidence - I got another one of these today:
An unexpected error occurred: * 4 EXPUNGE
There really is no way for the client to thread safe. All asynchronous commands or separate threads should use a dedicated instance of the client.
I agree that using a dedicated instance of the client on each thread negates the need for changes I suggested to GetTag() BUT it does not address the core problem that I raised in this issue.
I am using one instance of the client on one thread. I apologize if my original problem report is not clear - I will clarify it if necessary. AE.Net.Mail is already an excellent package but if this problem is corrected it will be even more reliable.
It looks like there is a bug that occurs on the following sequence of events when doing an IMAP search:
The code looks for a result that starts with "SEARCH" here (this is what appears to fail)
Ofcourse this is extremely rare (first time I've seen this in two months of use)
Also I believe that this method
should have a bit of syncronization to prevent the same id being handed out to two different commands sent at the same time. Unless this API is not guaranteed to be thread-safe.
Maybe remove "tag++;" and replace :
with