Fix: partial recv lead to client disconnect
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 9 Jul 2020 18:57:57 +0000 (14:57 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 27 Jul 2020 20:29:25 +0000 (16:29 -0400)
commit44c180cac90d0c2a0486d6bc1aeaf0f1538c1075
tree04893a63dec1440d98c78f1d74954d29bcbf9bc2
parent674c3e2c8477aafe7b2145861ad83dd041d59018
Fix: partial recv lead to client disconnect

On EWOULDBLOCK and EAGAIN, the ret value from
`lttcomm_send_unix_sock_non_block` and
`lttcomm_recv_unix_sock_non_block` would be equal to -1.

Solution
=====

For such cases, set ret equal to zero since it is effectively what was
received/sent. Caller should treat ret  >= 0 as `success` anyway.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I47677f26850bf544f672d270972de7cc2c6a2817
src/bin/lttng-sessiond/notification-thread-events.c
src/common/unix.c
This page took 0.03364 seconds and 4 git commands to generate.