mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-18 19:56:59 +00:00
MINOR: debug: make "show threads" properly iterate over all threads
Previously it would re-dump all threads to the same trash if the output buffer was full, which it never was since the trash is of the same size. Now it dumps one thread, copies it to the buffer and yields until it can continue. Showing 256 threads works as expected.
This commit is contained in:
parent
880d1684a7
commit
009b5519e6
@ -370,14 +370,18 @@ static int cli_io_handler_show_threads(struct appctx *appctx)
|
||||
else
|
||||
thr = 0;
|
||||
|
||||
do {
|
||||
chunk_reset(&trash);
|
||||
ha_thread_dump_all_to_trash();
|
||||
ha_thread_dump(&trash, thr);
|
||||
|
||||
if (applet_putchk(appctx, &trash) == -1) {
|
||||
/* failed, try again */
|
||||
appctx->st1 = thr;
|
||||
return 0;
|
||||
}
|
||||
thr++;
|
||||
} while (thr < global.nbthread);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user