Clear connection state before stopping to avoid potential deadlocks

This commit is contained in:
Cameron Gutman 2014-10-03 23:07:42 -07:00
parent f56b7ff79e
commit b6ee0764ff

View File

@ -680,8 +680,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
private void stopConnection() {
if (connecting || connected) {
conn.stop();
connecting = connected = false;
conn.stop();
}
// Close the Evdev watcher to allow use of captured input devices