Просмотр исходного кода

Merge pull request #776 from efryntov/fix/feedback-missing-shutdown

Android: shut down feedback executors before awaiting termination
Rod Hynes 1 день назад
Родитель
Сommit
136e46da07
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      MobileLibrary/Android/PsiphonTunnel/PsiphonTunnel.java

+ 1 - 0
MobileLibrary/Android/PsiphonTunnel/PsiphonTunnel.java

@@ -319,6 +319,7 @@ public class PsiphonTunnel {
         private final ExecutorService callbackQueue = Executors.newSingleThreadExecutor();
         private final ExecutorService callbackQueue = Executors.newSingleThreadExecutor();
 
 
         void shutdownAndAwaitTermination(ExecutorService pool) {
         void shutdownAndAwaitTermination(ExecutorService pool) {
+            pool.shutdown();
             try {
             try {
                 // Wait a while for existing tasks to terminate
                 // Wait a while for existing tasks to terminate
                 if (!pool.awaitTermination(5, TimeUnit.SECONDS)) {
                 if (!pool.awaitTermination(5, TimeUnit.SECONDS)) {