summaryrefslogtreecommitdiffstats
path: root/zebra/zserv.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-04-26 06:29:40 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-05-29 21:06:16 +0200
commitae6670d0138beac5ad8166a694d112b64a4d48ca (patch)
tree0fbe697fd8cad1b4b0cf0210b5ce03af60d53fa2 /zebra/zserv.h
parentzebra: fix zserv_read rescheduling (diff)
downloadfrr-ae6670d0138beac5ad8166a694d112b64a4d48ca.tar.xz
frr-ae6670d0138beac5ad8166a694d112b64a4d48ca.zip
zebra: don't send data after closing connection
Cancelling threads is nice but they can potentially be scheduled again after cancellation without an explicit check. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'zebra/zserv.h')
-rw-r--r--zebra/zserv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/zserv.h b/zebra/zserv.h
index a1b55bf8e..c8b65b6a4 100644
--- a/zebra/zserv.h
+++ b/zebra/zserv.h
@@ -53,6 +53,9 @@ struct zserv {
/* Client pthread */
struct frr_pthread *pthread;
+ /* Whether the thread is waiting to be killed */
+ _Atomic bool dead;
+
/* Client file descriptor. */
int sock;