Skip to content

Commit

Permalink
FORGE-2354: Close WatcherService to prevent thread leak.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerr committed Jun 10, 2015
1 parent cc03ca6 commit f781efa
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,18 @@ private void cleanup()
loader = null;
manager.dispose();
manager = null;
if(watcher!=null)
{
try
{
watcher.close();
}
catch (IOException e)
{
logger.log(Level.SEVERE, "Error occurred.", e);
}
watcher = null;
}
repositories.clear();
executor.shutdownNow();
firedAfterStart = false;
Expand Down

0 comments on commit f781efa

Please sign in to comment.