move shutdownNow within try block
This commit is contained in:
parent
3d7186c81f
commit
656422cff6
|
@ -135,10 +135,10 @@ public final class Sniffer extends RestClient.FailureListener implements Closeab
|
||||||
if (scheduledExecutorService.awaitTermination(1000, TimeUnit.MILLISECONDS)) {
|
if (scheduledExecutorService.awaitTermination(1000, TimeUnit.MILLISECONDS)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
scheduledExecutorService.shutdownNow();
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
}
|
}
|
||||||
scheduledExecutorService.shutdownNow();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue