chore(node-core): log errors in debug when ETA fails to calculate (#6971)

This commit is contained in:
Alexey Shekhirin
2024-03-05 19:20:37 +00:00
committed by GitHub
parent 405f9ab07e
commit 33d01d3206
5 changed files with 29 additions and 22 deletions

View File

@ -51,7 +51,7 @@ extern "C" fn print_stack_trace(_: libc::c_int) {
// Collect return addresses
let depth = libc::backtrace(STACK_TRACE.as_mut_ptr(), MAX_FRAMES as i32);
if depth == 0 {
return;
return
}
&STACK_TRACE.as_slice()[0..(depth as _)]
};