From c4ee500f1316e4f5222bca93f9bbac9ccad88803 Mon Sep 17 00:00:00 2001 From: Jaikumar Ganesh Date: Thu, 11 Nov 2010 15:51:19 -0800 Subject: [PATCH] Start the accept thread when the socket gets disconnected. Change-Id: I937c19c657a1077df8c2c19b5edc3fec218e11a4 --- .../com/example/android/BluetoothChat/BluetoothChatService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/samples/BluetoothChat/src/com/example/android/BluetoothChat/BluetoothChatService.java b/samples/BluetoothChat/src/com/example/android/BluetoothChat/BluetoothChatService.java index d0c1d43cd..20e9b9e07 100644 --- a/samples/BluetoothChat/src/com/example/android/BluetoothChat/BluetoothChatService.java +++ b/samples/BluetoothChat/src/com/example/android/BluetoothChat/BluetoothChatService.java @@ -402,6 +402,8 @@ public class BluetoothChatService { } catch (IOException e) { Log.e(TAG, "disconnected", e); connectionLost(); + // Start the service over to restart listening mode + BluetoothChatService.this.start(); break; } }