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>
Wed, 29 Jul 2020 17:02:17 +0000 (13:02 -0400)
commit2f31577d1c07af4e7ea28fd72beea4bf3959fa57
tree3863dabae0394d9a2d3dc96e2cb28f0dade5a242
parentd2d77525ab283446bd07a857cc43edf37ae583a3
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.026475 seconds and 4 git commands to generate.