Cleanup looper after shutting down.

This commit is contained in:
Peter Serwylo 2016-02-26 09:16:48 +11:00
parent 18f97602e8
commit 2ed6110ae5

View File

@ -69,6 +69,12 @@ public class WifiSwap extends SwapType {
Log.i(TAG, "we've been asked to stop the webserver: " + msg.obj);
setConnected(false);
localHttpd.stop();
Looper looper = Looper.myLooper();
if (looper == null) {
Log.e(TAG, "Looper.myLooper() was null for sum reason while shutting down the swap webserver.");
} else {
looper.quit();
}
}
};
try {