react-native-tcp-socket
react-native-tcp-socket copied to clipboard
fix(Android): Add missing timeout argument to socket.connect()
Adds previously missing usage of timeout
option
@jesperjohansson, thanks for the PR! However, the timeout has been moved to the JS part of the code, as you can see here: https://github.com/Rapsssito/react-native-tcp-socket/blob/c68215ca5e8d196cb069c6d8cfc3817fe3f28f4a/src/Socket.js#L153-L169
@Rapsssito Without the timeout in native level I couldn't connect successfully after a timeout, all sequent attempts would timeout
@jesperjohansson, I didn't know that was happening. Then there must be a bug in the JS code.
This timeout is necessary for finishing connecting mode and being ready to reconnecting on another Host.
@jesperjohansson @c0mm4nDer the timeout option is going to be deleted soon as it does not comply with Node's net API.