Skip to content

Commit

Permalink
Merge pull request #77 from michitux/teardown_fixes
Browse files Browse the repository at this point in the history
Fixes for connectivity issues
  • Loading branch information
mar-v-in committed Jan 18, 2016
2 parents affce9d + 4880946 commit 381da4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ private void send(Message message) {

private void sendOutputStream(int what, Object obj) {
McsOutputStream os = outputStream;
if (os != null) {
if (os != null && os.isAlive()) {
Handler outputHandler = os.getHandler();
if (outputHandler != null)
outputHandler.sendMessage(outputHandler.obtainMessage(what, obj));
Expand Down

0 comments on commit 381da4b

Please sign in to comment.