Fix mcp large response race condition (#5065)

Signed-off-by: alexyao2015 <alexyao2015@users.noreply.github.com>
Co-authored-by: alexyao2019@gmail.com <alexyao2015@users.noreply.github.com>
This commit is contained in:
Alex Yao
2025-10-15 18:50:14 -04:00
committed by GitHub
parent 7c1f5dcb2f
commit a6beb956f5
@@ -64,7 +64,7 @@ fn write_large_text_to_file(content: &str) -> Result<String, std::io::Error> {
std::fs::create_dir_all(&temp_dir)?;
// Generate a unique filename with timestamp
let timestamp = Utc::now().format("%Y%m%d_%H%M%S");
let timestamp = Utc::now().format("%Y%m%d_%H%M%S%.6f");
let filename = format!("mcp_response_{}.txt", timestamp);
let file_path = temp_dir.join(&filename);