summaryrefslogtreecommitdiff
path: root/bgpd/bgp_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_io.c')
-rw-r--r--bgpd/bgp_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_io.c b/bgpd/bgp_io.c
index 3882ff8b56..69c92e829c 100644
--- a/bgpd/bgp_io.c
+++ b/bgpd/bgp_io.c
@@ -179,7 +179,7 @@ static int bgp_process_reads(struct thread *thread)
peer = THREAD_ARG(thread);
- if (peer->fd < 0)
+ if (peer->fd < 0 || bm->terminating)
return -1;
struct frr_pthread *fpt = frr_pthread_get(PTHREAD_IO);