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

performance issues when pinging for an acitve session #7

Closed
Vortex2Oblivion opened this issue Jul 28, 2023 · 4 comments
Closed

performance issues when pinging for an acitve session #7

Vortex2Oblivion opened this issue Jul 28, 2023 · 4 comments

Comments

@Vortex2Oblivion
Copy link

Vortex2Oblivion commented Jul 28, 2023

Whenever i try and ping for an active session I'm experiencing a little bit of performance drops.
Is this normal?

if(Options.getData("gjUsername") != ""){
				var pingTimer:FlxTimer = new FlxTimer();
				pingTimer.start(30, function(_:FlxTimer){	
				trace("pinging..");		
				GJClient.pingSessions(Options.getData("gjUsername"), Options.getData("gjUserToken"), 'active', function(json:Dynamic){
					trace("found session!");
					}, 
					function(message:String){
						trace("No session found for: " + Options.getData("gjUsername"));
						trace("Retrying!...");
						GJClient.openSessions(Options.getData("gjUsername"), Options.getData("gjUserToken"), function(json:Dynamic){
							trace("Made a new session");
						}, function(message:String) // on Failure
						{
							trace("could not open a new session");
						});
					});
				},0);
			}

here is the code im using for checking for a session

@MAJigsaw77
Copy link
Owner

haxe.Http can lag when the connection is poor as it isn't async

@Vortex2Oblivion
Copy link
Author

Wait so it's my crappy internet that's causing the issue?

@MAJigsaw77
Copy link
Owner

Wait so it's my crappy internet that's causing the issue?

Yeap

@Vortex2Oblivion
Copy link
Author

That's fun

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

2 participants