detect socket closed error

This commit is contained in:
Milos Kozak 2016-08-09 15:46:08 +02:00
parent 49d6690450
commit 0ad856bed1

View file

@ -203,7 +203,11 @@ public class ExecutionService extends Service {
try { try {
mRfcommSocket.connect(); mRfcommSocket.connect();
} catch (IOException e) { } catch (IOException e) {
//e.printStackTrace();
if (e.getMessage().contains("socket closed")) {
e.printStackTrace(); e.printStackTrace();
break;
}
} }
waitMsec(1000); waitMsec(1000);