qorelanguage / qore

Qore Programming Language
GNU General Public License v2.0
60 stars 10 forks source link

Socket polling broken on macOS in some cases #4791

Closed davidnich closed 1 year ago

davidnich commented 1 year ago

Darwin / macOS (at least Darwin 22.6.0 / macOS Ventura 13.5.2) can return an ENOTCONN error to a zero-byte write after a poll() after a connect() indicates that the connection is ready for writing.

In this case repeating the check allows the non-blocking I/O operation to continue and work as expected