mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-11 01:41:49 -04:00
BUG/MINOR: debug: make ha_task_dump() always check the task before dumping it
For now it cannot happen since we're calling it from a task but it will break with signals. No backport is needed.
This commit is contained in:
parent
6db1699f77
commit
231ec395c1
1 changed files with 5 additions and 0 deletions
|
|
@ -75,6 +75,11 @@ void ha_thread_dump(int thr)
|
|||
*/
|
||||
void ha_task_dump(const struct task *task, const char *pfx)
|
||||
{
|
||||
if (!curr_task) {
|
||||
chunk_appendf(&trash, "0\n");
|
||||
return;
|
||||
}
|
||||
|
||||
chunk_appendf(&trash,
|
||||
"%p (%s) calls=%u last=%llu%s\n",
|
||||
curr_task, TASK_IS_TASKLET(curr_task) ? "tasklet" : "task",
|
||||
|
|
|
|||
Loading…
Reference in a new issue