Skip to content

Commit

Permalink
fix(dap): safely handle dap.run_last
Browse files Browse the repository at this point in the history
dap.run_last will reuse the before/after functions which means the
result future is set twice

See #234
  • Loading branch information
rcarriga committed May 27, 2023
1 parent 6435a36 commit 80f9c96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/neotest/client/strategies/dap/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ return function(spec)
end
dap.listeners.after.event_exited[handler_id] = function(_, info)
result_code = info.exitCode
finish_future.set()
pcall(finish_future.set)
end

return adapter_before and adapter_before() or config
Expand Down

0 comments on commit 80f9c96

Please sign in to comment.