diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-07-25 16:48:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-25 16:48:19 +0200 |
| commit | d1070df553d84d8409f890745a9fdb2eb10cbb64 (patch) | |
| tree | aed0706d1d7fec02764727f1633b4301382a677b /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | ae71900ef6e68a8b497f9b5ab255977fcfb64d36 (diff) | |
| parent | 17b4fbc388ec11a3c1cdf7e33ff00a0322edaf98 (diff) | |
| download | rust-d1070df553d84d8409f890745a9fdb2eb10cbb64.tar.gz rust-d1070df553d84d8409f890745a9fdb2eb10cbb64.zip | |
Rollup merge of #127300 - biabbas:fix_connect_timeout, r=tgross35
Fix connect timeout for non-linux targets, read readiness of socket connection, Read readiness to detect errors. `Fixes #127018` Fixes #127018 Connect_timeout would call `poll` and check `pollfd.revents` for POLLHUP error, rather that checking readiness. This behavior was meant for Linux as it returns POLLHUP | POLLOUT | POLLERR in case of errors. But on targets that do not return POLLHUP in `pollfd.revents`, this would indicate a false success and result in this issue. To resolve this we will check readiness of socket using `getsockopt():` and return success from connect_timeout when there are no errors. Changes were tested on Linux and an rtos.  Thank you.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
