lunarmodules / luasocket

Network support for the Lua language
http://lunarmodules.github.io/luasocket/
MIT License
1.85k stars 629 forks source link

`socket.connect` blocks indefinitely in non-blocking mode #382

Open nikneym opened 2 years ago

nikneym commented 2 years ago

socket.connect or connect method blocks indefinitely when network speed or bandwith is low. It also blocks when DNS resolution fails or takes some time. Probably gets blocked at socket_waitfd, not sure if the same is happening on Windows, just checked usocket.c.

alerque commented 2 years ago

Thanks for the report. Unfortunately I am unable to invest much of my spare time in developing this right now, but I thought I'd drop a comment to say that I am available enough to facilitate PRs that fix bugs or add features, so if anybody has time to scratch this itch and fix/improve the library there should be a path to getting it merged and released.

nikneym commented 2 years ago

I've made this to deal with the problem in the moment, leaving it here for people who may encounter a similar problem.

alerque commented 11 months ago

Any overlap with #190 and/or #278 here?