# HG changeset patch # User Thomas Klausner # Date 1563797564 -7200 # Node ID 4968bc47a1a56efb71b27281288107107d12e1ee # Parent 2131d6bdf32afe743908323d665ebb846746c54d fd_fifo_getstats: it is not an error if a queue does not exist This happens e.g. when peers disappear or during shutdown. diff -r 2131d6bdf32a -r 4968bc47a1a5 libfdproto/fifo.c --- a/libfdproto/fifo.c Fri Jul 19 11:43:26 2019 +0200 +++ b/libfdproto/fifo.c Mon Jul 22 14:12:44 2019 +0200 @@ -293,6 +293,11 @@ { TRACE_ENTRY( "%p %p %p %p %p %p %p %p", queue, current_count, limit_count, highest_count, total_count, total, blocking, last); + if (queue == NULL) { + /* It is not an error if the queue is not available; happens e.g. when peers disappear */ + return 0; + } + /* Check the parameters */ CHECK_PARAMS( CHECK_FIFO( queue ) );