Clean out stale data in ring buffer when client disconnects.

master
Stephen Blinick 2019-02-10 15:23:42 -07:00
parent d0e7dcde04
commit da0c8ea073
1 changed files with 4 additions and 0 deletions

View File

@ -580,6 +580,10 @@ int main(int argc, char **argv)
closesocket(s);
printf("all threads dead..\n");
// Clear stale data for next client
ringbuf_head = ringbuf_tail = 0;
memset(ringbuf, 0, ringbuf_sz);
do_exit = 0;
}