aboutgitcodebugslistschat
path: root/tap.c
diff options
context:
space:
mode:
Diffstat (limited to 'tap.c')
-rw-r--r--tap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tap.c b/tap.c
index 6db5d88..cddc164 100644
--- a/tap.c
+++ b/tap.c
@@ -1117,8 +1117,10 @@ void tap_sock_reset(struct ctx *c)
{
info("Client connection closed%s", c->one_off ? ", exiting" : "");
- if (c->one_off)
+ if (c->one_off) {
+ fsync_pcap_and_log();
_exit(EXIT_SUCCESS);
+ }
/* Close the connected socket, wait for a new connection */
epoll_del(c, c->fd_tap);