From 6933a4338bea69b6bbe39f07b971c90e389ec4fc Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Thu, 19 Oct 2023 23:16:16 -0700 Subject: [PATCH] fix early idle timeout in IP stack simulator --- src/IPStackSimulator.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/IPStackSimulator.cc b/src/IPStackSimulator.cc index d029e1f2..c36fa1a2 100644 --- a/src/IPStackSimulator.cc +++ b/src/IPStackSimulator.cc @@ -235,6 +235,9 @@ void IPStackSimulator::on_client_input(struct bufferevent* bev) { return; } + struct timeval tv = usecs_to_timeval(60 * 1000 * 1000); + event_add(c->idle_timeout_event.get(), &tv); + while (evbuffer_get_length(buf) >= 2) { uint16_t frame_size; evbuffer_copyout(buf, &frame_size, 2);