EsotericSoftware / kryonet

TCP/UDP client/server library for Java, based on Kryo
BSD 3-Clause "New" or "Revised" License
1.81k stars 416 forks source link

Client connect timeout not being used #109

Open m6246 opened 8 years ago

m6246 commented 8 years ago

Client.connect accepts a timeout parameter which is stored so Client.reconnect will use that, however within Client.connect at line 175, tcp.connect uses a hard-coded timeout value of 5000 where the timeout parameter should be used.

payne911 commented 4 years ago

@m6246 have you tried changing it to the timeout value and seeing if it works? You could submit a PR for that.

crykn commented 4 years ago

As #connect is just calling Socket#connect this should most definitely work.

Strangely, the timeout is used for reconnecting, see here.

payne911 commented 4 years ago

Indeed, that is strange.