[Lldb-commits] [lldb] [lldb] Add a callback version of TCPSocket::Accept (PR #106955)

Dmitry Vasilyev via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 2 16:23:33 PDT 2024


https://github.com/slydiman requested changes to this pull request.

BTW, I have figured out a side effect. MainLoopWindows uses events created by WSACreateEvent(). WSACreateEvent() creates the `manual-reset` event. But WSAResetEvent() is used only for m_trigger_event. All other events (READ, ACCEPT, CLOSE) are never reset. I have no idea how it worked before. But I got thousands of error messages using this patch with lldb-server after first connection:
```
AcceptSocket(): A non-blocking socket operation could not be completed immediately
```
I have added `WSAResetEvent(KV.second.event);` before `ProcessReadObject(KV.first);` in MainLoopWindows.cpp to fix it. It seems this issue must be fixed before or with this patch, otherwise it will break the Windows build.

https://github.com/llvm/llvm-project/pull/106955


More information about the lldb-commits mailing list