aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vcl/sock_test_server.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/vcl/sock_test_server.c b/src/vcl/sock_test_server.c
index c0baefa99de..39ffb8e2f48 100644
--- a/src/vcl/sock_test_server.c
+++ b/src/vcl/sock_test_server.c
@@ -704,6 +704,16 @@ main (int argc, char **argv)
}
for (i = 0; i < num_ev; i++)
{
+ conn = &ssm->conn_pool[ssm->wait_events[i].data.u32];
+ if (ssm->wait_events[i].events & (EPOLLHUP | EPOLLRDHUP))
+ {
+#ifdef VCL_TEST
+ vppcom_session_close (conn->fd);
+#else
+ close (conn->fd);
+#endif
+ continue;
+ }
if (ssm->wait_events[i].data.u32 == ~0)
{
new_client ();
@@ -717,7 +727,6 @@ main (int argc, char **argv)
continue;
}
#endif
- conn = &ssm->conn_pool[ssm->wait_events[i].data.u32];
#endif
client_fd = conn->fd;