Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commands are sent twice #29

Closed
Alia5 opened this issue Apr 3, 2013 · 41 comments
Closed

commands are sent twice #29

Alia5 opened this issue Apr 3, 2013 · 41 comments

Comments

@Alia5
Copy link

Alia5 commented Apr 3, 2013

say -1 is sent twice :(

@Alia5
Copy link
Author

Alia5 commented Apr 3, 2013

BattleNET_client.exe -host 127.0.0.1 -port 2302 -password XXXXXXXXXX -command "say -1 something"

@Alia5
Copy link
Author

Alia5 commented Apr 3, 2013

nervermind, its a problem with wine...

@marceldev89
Copy link
Owner

If you fixed it somehow with wine please do tell how. There are a few more with issues like that.

@Alia5
Copy link
Author

Alia5 commented Apr 3, 2013

in a shellscript...

BattleNET_client.exe blabla
sleep 2
kill $(pidof BattleNET_client.exe)

Quick and dirty, but works surprisingly well!

It seems like when logging out the command gets sent again in wine

also fixed the problem the console is not closing...
didn't look at your code since c# isn't for me

@Alia5
Copy link
Author

Alia5 commented Apr 3, 2013

only works for say though :(

@marceldev89
Copy link
Owner

Can you try it with native mono (from your distribution repository and not for wine, i.e. aptitude install mono)?

@Alia5
Copy link
Author

Alia5 commented Apr 4, 2013

WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v1.1.4322

** (BattleNET_client.exe:19193): WARNING **: Missing method System.Console::set_OutputEncoding(Encoding) in assembly /usr/lib/mono/1.0/mscorlib.dll, referenced in assembly /home/arma/.wine/drive_c/Program Files/bec/BattleNET_client.exe

Unhandled Exception: System.MissingMethodException: Method not found: 'System.Console.set_OutputEncoding'.

@marceldev89
Copy link
Owner

Hmm never seen that but I guess Linux/mono doesn't support that. ^^

@Alia5
Copy link
Author

Alia5 commented Apr 4, 2013

I assume battleNet requires .net 4.0?
mono only has support till 3.5
didn't try to compile experimental versions though

@marceldev89
Copy link
Owner

hmm not sure, it worked fine for me when I ran the server on linux. I was running Debian testing though.

@Alia5
Copy link
Author

Alia5 commented Apr 6, 2013

Yeah testing Versions if Debian have newer versions of mono...
Using stable i should try to compile them then!

@marceldev89
Copy link
Owner

Hmm building BattleNET with .NET 3.5 doesn't show any errors, you could try that instead. That would be a lot easier than compiling mono. ^^

@Alia5
Copy link
Author

Alia5 commented Apr 7, 2013

Yeah sure!
Compiling mono wouldn't be a problem... It's the time that I do not have, sadly :(
Will try tomorrow tough

@marceldev89
Copy link
Owner

If this is still a problem, check what happens with wireshark. Also I'm starting to think that it might be an encoding issue except I'm not sure why. 😄

@joaomcarlos
Copy link

Hey Marcel, this is a problem for me. I sometimes get reports of ppl with this problem. I have it myself from time to time. Example, send global message and it goes twice.

@marceldev89
Copy link
Owner

And this is all on linux environments?

@marceldev89
Copy link
Owner

I don't have this issue at all on a windows environment though.

http://pastebin.com/Y2mBT6w8

@marceldev89
Copy link
Owner

Hmm actually, I have 1 duplicate line and 1 missing line in total.

@joaomcarlos
Copy link

All my clients run windows, even tho my tool uses mono and is fully compatible with linux and macosx i have only tested it on my laptop and none of my clients use anything other than Windows.

Maybe I can send you a version of the tool so you can see it happening.

@marceldev89
Copy link
Owner

Haha, I believe you. 😄

@marceldev89
Copy link
Owner

Anyway, the only reason that this can happen is that the server takes longer than 2 seconds to respond. So if you guys feel like experimenting a bit, try increasing the value at BattleNET/BattlEyeClient.cs line 322.

@joaomcarlos
Copy link

Increased it to 15sec, will test it :D

@marceldev89
Copy link
Owner

Any results?

@joaomcarlos
Copy link

Hey Marcel, sorry to keep you in the dark, but I still am not 100% sure it fixes the problem. In local testing it did. 2 other users also show improvement, but, 7 others havent replied to me yet.

I assume it does fix the problem.

@marceldev89
Copy link
Owner

Well if this is a confirmed fix then I'll have an idea on how to fix it.

Not sure when though, but I'll get to it. 😄

@marceldev89
Copy link
Owner

Actually, what's the load on the servers when this problem starts to happen?

@DomiStyle
Copy link
Contributor

5 seconds did it for me.
Was also a problem with messages being received multiple times not only being sent multiple times.
15 seconds was atleast too long for DaRT as I do my own command resend.

@joaomcarlos
Copy link

It seems that the extra delay fixes the problem yes. From all that I have sent the version to, not one had it still showing.

@marceldev89
Copy link
Owner

Ok, I'll take a proper look at it soonish. Maybe implement some dynamic system for the timeouts and such taking the average server response time as a figure for the time based values.

@DomiStyle
Copy link
Contributor

Was planning to do something similar in DaRT so users can adjust the timeout value by themself.
Making it automatic is probably even better though.
Using 5 seconds works fine till then.

@KG7854
Copy link

KG7854 commented Aug 21, 2013

Hi guys,
When I request the "players" command I receive the players list twice (all the time), and the first time I send out a global message it also gets sent twice. After the first global message is sent twice it then works as it should, sending out messages only once but the players list still receives twice no matter what. I tried to change the value from 2 to15 in BattleNET/BattlEyeClient.cs line 322 and that didn't make any difference. I am running the server and developing on windows 7 machines x64

any help would be appreciated.

@marceldev89
Copy link
Owner

Hum, it's fairly reasonable to assume that BattlEye isn't the same as it was 5 months ago (when I last updated battlenet).

If there isn't someone with a fix in the next few days then I'll start doing some debugging work during the weekend. 😄

@KG7854
Copy link

KG7854 commented Aug 25, 2013

Thanks, looking forward to it, let me know if you need any help with testing, etc.

@marceldev89
Copy link
Owner

Ah, forgot about it.. I'll try to do it this weekend. 😄

@marceldev89
Copy link
Owner

Alright, updated the develop branch. Please build it, test it and let me know.

Couldn't reproduce the players command being sent twice though, so it might or might not be fixed. 😄

@KG7854
Copy link

KG7854 commented Sep 3, 2013

Thanks ziellos, that fixed the double first global message sent problem. The players list still gets sent twice, but if you don't have time its ok, My program just grabs the last player update command data anyways. But it would be cool to figure out how to fix this because I'm not sure if sending/receiving the players command twice will lag the server or not.... When I send the players command it takes a second or two then I receive the players data twice instantly, not sure if this helps you figure it out or not. If you have a guess where it could be I could try to mess with the code and maybe fix it, lol

Thanks again

@marceldev89
Copy link
Owner

Hmm, did you also test the 'players' command with the RCon client that comes with the library? And also with BERcon?

@KG7854
Copy link

KG7854 commented Sep 7, 2013

Sorry I have been busy, I will do that and report back.

@marceldev89
Copy link
Owner

No worries, and thank you. 😄

@KG7854
Copy link

KG7854 commented Sep 9, 2013

I have tested both the above mentioned clients and they both work, it just must be something on my side.

@marceldev89
Copy link
Owner

Alright. I'll close this one for now. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants