Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
VCL: Handle epoll HUP events in sock_test_server
[vpp.git]
/
src
/
vcl
/
sock_test_server.c
diff --git
a/src/vcl/sock_test_server.c
b/src/vcl/sock_test_server.c
index
c0baefa
..
39ffb8e
100644
(file)
--- 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++)
{
}
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 ();
if (ssm->wait_events[i].data.u32 == ~0)
{
new_client ();
@@
-717,7
+727,6
@@
main (int argc, char **argv)
continue;
}
#endif
continue;
}
#endif
- conn = &ssm->conn_pool[ssm->wait_events[i].data.u32];
#endif
client_fd = conn->fd;
#endif
client_fd = conn->fd;