linux-cp: stop ignoring ENOBUFS while reading notif 24/35524/4
authorAlexander Chernavin <achernavin@netgate.com>
Fri, 22 Oct 2021 08:33:00 +0000 (08:33 +0000)
committerMatthew Smith <mgsmith@netgate.com>
Fri, 4 Mar 2022 18:24:09 +0000 (18:24 +0000)
commitf4795a9bd8f488c5d32f9b171aa1d195bb4b8186
treefc7384315cc4c2189d2004a1067a08bc665934ce
parent7e0442aaabb2cd35e9cf93fe9893649cfa4a6d93
linux-cp: stop ignoring ENOBUFS while reading notif

Type: improvement

Currently, while reading notifications, ENOBUFS error is ignored and
reading continues. This was done to minimize the number of notifications
that are lost due to reopening the socket.

Now that synchronization is implemented to recover from socket errors,
ignoring ENOBUFS and reading as much notifications as possible is not
actual. Before synchronization, all currently enqueued notification are
discarded in any case.

With this change, stop reading notifications if any error occurs.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I1184d9a3aa99df63ef59bc2a67be2b1e5e0e9329
src/plugins/linux-cp/lcp_nl.c