Skip to content

Commit

Permalink
Swallow interruption while stopping recognition.
Browse files Browse the repository at this point in the history
Do not hide InterruptedException and notify the code higher up that
intrruption occured.

git-svn-id: svn+ssh://svn.code.sf.net/p/cmusphinx/code/trunk/pocketsphinx-android@12403 94700074-3cef-4d97-a70e-9c8c206c02f5
  • Loading branch information
mbait committed Mar 27, 2014
1 parent d098e1e commit 2dab394
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/edu/cmu/pocketsphinx/SpeechRecognizer.java
Expand Up @@ -95,7 +95,8 @@ public boolean stop() {
recognizerThread.interrupt();
recognizerThread.join();
} catch (InterruptedException e) {
throw new IllegalStateException("", e);
// Restore the interrupted status.
Thread.currentThread().interrupt();
}

recognizerThread = null;
Expand Down

0 comments on commit 2dab394

Please sign in to comment.