Socket behaving differently in Android build than Simulator

I have a TCP socket connection in my app, and I have set it to timeout after 1 second if the connection is unsuccessful. This works fine inside the simulator and the windows build but when I export it to Android - the app freezes when making an unsuccessful connection rather than simply timing out after one second. Any reason as to why this can be? I am using the lua socket library to handle my socket connections

Out of curiosity, what build.settings permissions are you using for android?

“android.permission.INTERNET”,
“android.permission.ACCESS_NETWORK_STATE”
these are what I’m using

That seems right. Hmmm.