Rapsssito / react-native-tcp-socket

React Native TCP socket API for Android, iOS & macOS with SSL/TLS support.
MIT License
303 stars 81 forks source link

fix(Android): Add missing timeout argument to socket.connect() #149

Closed jesperjohansson closed 1 year ago

jesperjohansson commented 2 years ago

Adds previously missing usage of timeout option

Rapsssito commented 2 years ago

@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

jesperjohansson commented 2 years ago

@Rapsssito Without the timeout in native level I couldn't connect successfully after a timeout, all sequent attempts would timeout

Rapsssito commented 2 years ago

@jesperjohansson, I didn't know that was happening. Then there must be a bug in the JS code.

c0mm4nDer commented 1 year ago

This timeout is necessary for finishing connecting mode and being ready to reconnecting on another Host.

Rapsssito commented 1 year ago

@jesperjohansson @c0mm4nDer the timeout option is going to be deleted soon as it does not comply with Node's net API.