Implemented anti flood protection using threads