Prevent endless loop when receiving contact sync message

This commit is contained in:
AsamK 2021-08-30 13:55:25 +02:00
parent 32150b1aaa
commit 7a3522dc01

View file

@ -222,8 +222,13 @@ public class SyncHelper {
try { try {
c = s.read(); c = s.read();
} catch (IOException e) { } catch (IOException e) {
logger.warn("Sync contacts contained invalid contact, ignoring: {}", e.getMessage()); if (e.getMessage() != null && e.getMessage().contains("Missing contact address!")) {
continue; logger.warn("Sync contacts contained invalid contact, ignoring: {}", e.getMessage());
continue;
} else {
logger.warn("Failed to read sync contacts", e);
break;
}
} }
if (c == null) { if (c == null) {
break; break;