Bug in RoundTripBench() in 1.2.4

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

Post Reply
Jormungandr
Posts: 5
Joined: 09 Feb 2010, 20:48

Bug in RoundTripBench() in 1.2.4

Post by Jormungandr »

I've found what I'm pretty sure is a bug in the RoundTripResponse processing in version 1.2.4 of the client. I was getting nothing but 0 millisecond round trips, which was a) strange and b) totally unlike what ping was telling me.

Turns out the following line in SysHandler.HandleRoundTripBench() was at fault:

Code: Select all

parameters.Add("elapsed", Convert.ToInt32(res.TotalSeconds)); 
Changing it to the following restored the expected behavior:

Code: Select all

parameters.Add("elapsed", Convert.ToInt32(res.TotalMilliseconds)); 
Thought you guys might like to know. And while it's annoying that this was broken, it's great that I had the library source code available so that I could fix the problem. :)
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Post by ThomasLund »

Thanks for the bug report! Will include it in next fix.
Post Reply