[Lldb-commits] [lldb] [lldb-dap] Add new optional argument `time-to-live` when using `--connection` (PR #156803)
    Roy Shi via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Fri Sep  5 15:55:15 PDT 2025
    
    
  
================
@@ -327,6 +366,11 @@ serveConnection(const Socket::SocketProtocol &protocol, const std::string &name,
       std::unique_lock<std::mutex> lock(dap_sessions_mutex);
       dap_sessions.erase(&loop);
       std::notify_all_at_thread_exit(dap_sessions_condition, std::move(lock));
+
+      // Start the countdown to kill the server at the end of each connection.
----------------
royitaqi wrote:
@jeffreytan81: Thanks for the review. I think you misread the patch. The connection timeout (not the termination of the server) is started at the end of each connection. If a new connection establishes before the timeout finishes, it will reset the timeout in `ResetTimeToLive()`, so only the timeout from the last connection will activate the actual termination of the server.  LMK if you think that's not what the code does.
https://github.com/llvm/llvm-project/pull/156803
    
    
More information about the lldb-commits
mailing list