I just spent 2 hours struggling with the exact same problem. I finally discovered the source of the bug. If create a controller, and down't start it, shutdown()
won't kill any of the threads created. Instead, you have to use the following:
controller.shutdown();
controller.getPageFetcher().shutdown();
where controller
is your instance of CrawlController.
I also raised this as an issue on the crawler4j project page, and it looks like this will be fixed by the release of version 3.6