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:03:22 +0000 (13:03 -0400)
commit664ab72cc87f316602efe683ddaa8c53003eedd4
treeabd3b0d246fd031b8d8f78e62b52f70d98de4ca9
parent8a489ef928a15fd3cd18341340228874a4c94d27
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.025252 seconds and 4 git commands to generate.