From 087deb338e909ff57f3655e2c0ada3f09eb55283 Mon Sep 17 00:00:00 2001 From: ismail Date: Tue, 9 Sep 2025 09:26:24 +0300 Subject: [PATCH] Fix STOP command issuing when idle Fixed almost unconditional STOP command issuing when the channel is idle. Refs #1104, #1105 and closes #1107. --- src/relay_chn_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/relay_chn_core.c b/src/relay_chn_core.c index d1347cc..2d8fba8 100644 --- a/src/relay_chn_core.c +++ b/src/relay_chn_core.c @@ -216,8 +216,8 @@ void relay_chn_issue_cmd(relay_chn_ctl_t* chn_ctl, relay_chn_cmd_t cmd) } if (cmd == RELAY_CHN_CMD_STOP) { - if (chn_ctl->state == RELAY_CHN_STATE_STOPPED) { - return; // Do nothing if already stopped + if (chn_ctl->state == RELAY_CHN_STATE_STOPPED || chn_ctl->state == RELAY_CHN_STATE_IDLE) { + return; // Do nothing if already stopped or idle } // If the command is STOP, issue it immediately relay_chn_dispatch_cmd(chn_ctl, cmd);