kryonet icon indicating copy to clipboard operation
kryonet copied to clipboard

`connected` method not called on server but called on the client.

Open midn1 opened this issue 7 years ago • 3 comments

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 avatar Dec 27 '16 11:12 midn1

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.

sylvia43 avatar Apr 05 '17 17:04 sylvia43

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!

andrewse02 avatar Aug 22 '20 23:08 andrewse02

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

midn1 avatar Aug 23 '20 09:08 midn1