move shutdownNow within try block

This commit is contained in:
javanna 2016-06-10 11:42:25 +02:00 committed by Luca Cavanna
parent 3d7186c81f
commit 656422cff6
1 changed files with 1 additions and 1 deletions

View File

@ -135,10 +135,10 @@ public final class Sniffer extends RestClient.FailureListener implements Closeab
if (scheduledExecutorService.awaitTermination(1000, TimeUnit.MILLISECONDS)) {
return;
}
scheduledExecutorService.shutdownNow();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
scheduledExecutorService.shutdownNow();
}
}