summaryrefslogtreecommitdiff
path: root/mgmtd/mgmt_txn.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-01-28 01:18:10 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2024-01-28 01:18:10 +0200
commitbe9209a7e4169ad9256a125f77a9578298d93613 (patch)
tree84632e0b36e4b8be08277c5b4117e7663a6e858e /mgmtd/mgmt_txn.c
parent03fd7d589ac054243060526c58e0d4bebc644ce9 (diff)
mgmtd: fix get-data transaction hangup
When no data requests were sent to the backends, return immediately, instead of waiting for a timeout. This can happen if backends providing the requested data are not connected to mgmtd. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'mgmtd/mgmt_txn.c')
-rw-r--r--mgmtd/mgmt_txn.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mgmtd/mgmt_txn.c b/mgmtd/mgmt_txn.c
index 786fa0d0a3..7f88524e85 100644
--- a/mgmtd/mgmt_txn.c
+++ b/mgmtd/mgmt_txn.c
@@ -2441,6 +2441,10 @@ state:
mgmt_msg_native_free_msg(msg);
+ /* Return if we didn't send any messages to backends */
+ if (!get_tree->sent_clients)
+ return txn_get_tree_data_done(txn, txn_req);
+
/* Start timeout timer - pulled out of register event code so we can
* pass a different arg
*/