There was only a detection for data NOT inflight and for data inflight,
if a relayd was found, was simply exiting the loop and return no data
pending.
Signed-off-by: David Goulet <dgoulet@efficios.com>
ret = relayd_end_data_pending(&relayd->control_sock,
relayd->relayd_session_id, &is_data_inflight);
pthread_mutex_unlock(&relayd->ctrl_sock_mutex);
- if (ret < 0 || !is_data_inflight) {
- /* On error or if NO data inflight, no data is pending. */
+ if (ret < 0) {
goto data_not_pending;
}
+ if (is_data_inflight) {
+ goto data_pending;
+ }
}
/*