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

connected method not called on server but called on the client. #124

Open
midn1 opened this issue Dec 27, 2016 · 3 comments
Open

connected method not called on server but called on the client. #124

midn1 opened this issue Dec 27, 2016 · 3 comments

Comments

@midn1
Copy link

midn1 commented Dec 27, 2016

The client is ran on Android 5.1.1 and my server is on an Ubuntu 14.04.

Is this because my client calls Client.connect in a temporary thread?

@midn1 midn1 changed the title Server not receiving any packets sent by Android 5.1.1 connected method not called on server but called on the client. Dec 27, 2016
@sylvia43
Copy link
Contributor

sylvia43 commented Apr 5, 2017

I was just having the same issue, but I figured it out. I was running client.addListener() after client.connect(...). The connect() event was fired before the listener is added. Maybe you might be having the same issue?

Running client.connect() on a temporary thread wouldn't be an issue, but if that runs before the listener is added, this could be the issue.

@andrewse02
Copy link

This is what fixed my issue too! I was looking for like an hour or two trying to figure it out and I just found this! Thanks so much even over 3 years later this still fixed my simple mistake!

@midn1
Copy link
Author

midn1 commented Aug 23, 2020

Hell, I sometimes find solutions on mailing lists that are decades old :).

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

No branches or pull requests

3 participants