Commit 183cb45
authored
[lldb-dap] Fixing a race during disconnect. (llvm#135872)
While attempting to disconnect the DAP transport reader thread is
setting
`disconnecting` as soon as it sees a [disconnect
request](https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Disconnect).
However, if it is processing another request when this disconnect
arrives the `DAP::Loop` handler may exit the loop without replying to
the disconnect request.
There has been some instability on the CI jobs due to this race, for
example https://lab.llvm.org/buildbot/#/builders/59/builds/16076
To address this, ensure we only return from `DAP::Loop` once we've
emptied the queue.1 parent 9483aaa commit 183cb45
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
924 | | - | |
| 924 | + | |
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
| |||
0 commit comments