marceldev89 / BattleNET

BattlEye Protocol Library and Client
GNU Lesser General Public License v3.0
76 stars 44 forks source link

Application occasionally loses connection, then reconnects #42

Closed GStenroos closed 8 years ago

GStenroos commented 8 years ago

Hello,

First off thanks for building this library. I've been putting it to extensive work in an application I've written to help manage our Overpoch server.

In my application, BattleNET occasionally loses connection with the server, but then regains connection a few seconds later. Do you have any ideas that could help point me in the right direction as to why this is happening? I'm sure it's some kind of issue with my implementation, but I wanted to check here just to make sure it's not a known bug and to get some ideas.

Thanks!

marceldev89 commented 8 years ago

First off thanks for building this library. I've been putting it to extensive work in an application I've written to help manage our Overpoch server.

Thank you, it's always nice to hear that something you wrote is being used!

In my application, BattleNET occasionally loses connection with the server, but then regains connection a few seconds later. Do you have any ideas that could help point me in the right direction as to why this is happening?

I've never ran into this problem myself during development but I've seen a few mentions of it. For example @EPM-Cortez mentions something about it at the bottom of the post here. From what I understood he fixed the issue(s) and he sort of told me he'd contribute the fixes back to this library but I haven't heard from him since, sadly.

Other than that, I'm no longer "actively" working on the library because I got out of the server hosting game a long time ago and no longer have a need for the library. But if someone else feels like debugging and providing me with details then I'm more than happy to fix the issue (or accept a pull request). :)

marceldev89 commented 8 years ago

@GStenroos, @EPM-Cortez just messaged me that the last fixes we did, fixed the issues he was having and dropped his own rewrite in favor of the changes made here. He also told me that including the source in your own projects instead of using the DLL seems to cause less issues over time.

In case you're using the version from NuGet, it's outdated. The last build containing the fixes we did can be found here or just clone the repo.

Closing this for now. If you disagree, feel free to reopen it. :smiley:

GStenroos commented 8 years ago

@marceldev89 I think I solved a lot of the problems I've been having on this tonight actually. I had a lot of code doing processing/parsing of the messages within the message listener methods, and I noticed that whenever the client lost connection, it was usually during times when there was a lot of server chat happening.

I moved most of that code out of the message listener methods and the issue seems to have disappeared.