NIFI-259: Ensured that thread pools were being shutdown properly

This commit is contained in:
Mark Payne 2016-01-21 12:00:40 -05:00
parent f6ec437bc7
commit 09357297e2
2 changed files with 3 additions and 0 deletions

View File

@ -182,6 +182,7 @@ public class EndpointConnectionPool {
public Thread newThread(final Runnable r) { public Thread newThread(final Runnable r) {
final Thread thread = defaultFactory.newThread(r); final Thread thread = defaultFactory.newThread(r);
thread.setName("NiFi Site-to-Site Connection Pool Maintenance"); thread.setName("NiFi Site-to-Site Connection Pool Maintenance");
thread.setDaemon(true);
return thread; return thread;
} }
}); });

View File

@ -129,6 +129,8 @@ public class WriteAheadLocalStateProvider extends AbstractStateProvider {
@Override @Override
public synchronized void shutdown() { public synchronized void shutdown() {
executor.shutdown();
try { try {
writeAheadLog.shutdown(); writeAheadLog.shutdown();
} catch (final IOException ioe) { } catch (final IOException ioe) {