diff --git a/app/src/main/java/org/itxtech/daedalus/activity/ServerTestActivity.java b/app/src/main/java/org/itxtech/daedalus/activity/ServerTestActivity.java index c25914d..c7cfeaf 100644 --- a/app/src/main/java/org/itxtech/daedalus/activity/ServerTestActivity.java +++ b/app/src/main/java/org/itxtech/daedalus/activity/ServerTestActivity.java @@ -140,6 +140,17 @@ public class ServerTestActivity extends AppCompatActivity { mHandler.setViews(startTestBut, textViewTestInfo); } + @Override + protected void onDestroy() { + super.onDestroy(); + + if (mThread != null) { + mThread.interrupt(); + mThread = null; + } + mHandler = null; + } + public static class ServerTestHandler extends Handler { private Button startTestBtn = null; private TextView textViewTestInfo = null;