Fix bug in reporting of connection state, add regression tests.

This commit is contained in:
akwizgran
2020-06-02 12:00:06 +01:00
parent cc943be540
commit 78d7fc2106
2 changed files with 23 additions and 1 deletions

View File

@@ -214,7 +214,8 @@ class ConnectionRegistryImpl implements ConnectionRegistry {
@Override
public boolean isConnected(ContactId c) {
synchronized (lock) {
return contactConnections.containsKey(c);
List<ConnectionRecord> recs = contactConnections.get(c);
return recs != null && !recs.isEmpty();
}
}