summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--serialclient.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/serialclient.c b/serialclient.c
index f81c7cb..3cb0b0c 100644
--- a/serialclient.c
+++ b/serialclient.c
@@ -127,8 +127,10 @@ int main_loop(int serial_fd, int cmd_fd, options_t* opt)
if(FD_ISSET(serial_fd, &tmpfds))
return_value = process_data(serial_fd, cmd_fd);
- if(FD_ISSET(cmd_fd, &tmpfds))
+ if(FD_ISSET(cmd_fd, &tmpfds)) {
return_value = process_data(cmd_fd, serial_fd);
+ if(return_value == 2) return_value = 3;
+ }
}
signal_stop();