Skip to content

Commit

Permalink
McsInputStream: terminate if error occurred
Browse files Browse the repository at this point in the history
This terminates the input stream when an error occurred and does not
wait for the handler thread in the McsService to send the interrupt
signal.

This hopefully fixes a situation that I had where tear down messages
were created in a busy loop because of repeatedly reading -1 from the
input (I don't know how it got into the situation as the log was filled
with the messages from the tear down).
  • Loading branch information
michitux committed Jan 17, 2016
1 parent affce9d commit 3636f18
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public void run() {
mainHandler.dispatchMessage(mainHandler.obtainMessage(MSG_INPUT, msg));
} else {
mainHandler.dispatchMessage(mainHandler.obtainMessage(MSG_TEARDOWN, "null message"));
break; // if input is empty, do not continue looping
}
}
} catch (IOException e) {
Expand Down

0 comments on commit 3636f18

Please sign in to comment.