Bug in RoundTripBench() in 1.2.4

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

Moderators: Lapo, Bax

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

Bug in RoundTripBench() in 1.2.4

Postby Jormungandr » 09 Feb 2010, 20:57

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

Postby ThomasLund » 10 Feb 2010, 06:25

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

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 22 guests