From 4b12b3c35ae6fb7941ba82599f9eb564f5439427 Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Wed, 27 Jan 2016 23:37:58 +0200 Subject: [PATCH] CLI: If an error happens on the socket being polled, then the CLI does not close the socket. Resulting in the main thread being stuck in a tight infinite loop polling on the erronous socket. Change-Id: I630b84b97c059acce117d56e41cd201131db4cab Signed-off-by: Ole Troan --- vlib/vlib/unix/input.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlib/vlib/unix/input.c b/vlib/vlib/unix/input.c index ea10e4fc354..f9d7feceeb5 100644 --- a/vlib/vlib/unix/input.c +++ b/vlib/vlib/unix/input.c @@ -195,6 +195,8 @@ linux_epoll_input (vlib_main_t * vm, errors[n_errors] = f->error_function (f); n_errors += errors[n_errors] != 0; } + else + close(f->file_descriptor); } ASSERT (n_errors < ARRAY_LEN (errors)); -- 2.16.6