TReKiE / msnp-sharp

Automatically exported from code.google.com/p/msnp-sharp
0 stars 0 forks source link

offline message question #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I had used the new demo program but something problem was happen when I  
sent messages to my contact when they were offline. I sent the offline 
message about 15 times continuous to different my contacts. This program 
will be hang on. I don't know what's happen. Is it a bug? 

Original issue reported on code.google.com by fujuca...@yahoo.com.tw on 11 Aug 2008 at 7:56

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi,

When you send a lot of OIM message in a short time, an exception named
"SenderThrottleLimitExceeded" occurs. After that you must wait at least 10 
seconds.

Here, the code is(OIMService.cs): Thread.Sleep(11111) hangs on. A better
implementation may be useful for this issue. 

else if (soapexp.Code.Name == "SenderThrottleLimitExceeded")
                        {
                            if (Settings.TraceSwitch.TraceVerbose)
                                Trace.WriteLine("OIM: SenderThrottleLimitExceeded.
Waiting 11 seconds...");

                            System.Threading.Thread.Sleep(11111); // wait 11 seconds.
                        }

Original comment by hepha...@gmail.com on 12 Aug 2008 at 9:37

GoogleCodeExporter commented 9 years ago
Hmm....I think the best way to resolve this problem is to throw an Exception 
instead 
of Sleep.

Original comment by freezing...@gmail.com on 12 Aug 2008 at 9:56

GoogleCodeExporter commented 9 years ago
Hi Pang,

The best way of this issue is designing a EventHandler like OnOIMSentCompleted
attaching exception instead of throw. In space service, there is a class named
ContactCardCompletedEventArg. You got it :). Plus, You can make public:
Contact.OIMCount to handle sending messages.

Original comment by hepha...@gmail.com on 12 Aug 2008 at 10:25

GoogleCodeExporter commented 9 years ago
great, I will do it at this weekend.

Original comment by freezing...@gmail.com on 14 Aug 2008 at 9:51

GoogleCodeExporter commented 9 years ago
Fixed. Thanks for the report and fixer :)

Original comment by hepha...@gmail.com on 18 Aug 2008 at 8:38