Both close and closesocket should return 0 on success so using !! looks incorrect. I replaced this will a more readable == 0 check.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
AFAICT this fix is correct but I am not sure how to verify of test it. I ran the test suite and it passed but that does not mean this is being covered.
Comment Actions
Usually, the only thing one can do if a close fails is to log an error message, so it's not completely surprising that this has gone by unnoticed.
It might be nice to insert a close call to one of the existing Socket unit tests (or add a new one), but other than that, I am pretty sure this is fine.