mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Moved locking to the superclass to simplify subclasses.
This commit is contained in:
@@ -36,20 +36,12 @@ public class SimpleSocketPlugin extends SocketPlugin {
|
||||
|
||||
@Override
|
||||
protected SocketAddress getLocalSocketAddress() {
|
||||
Map<String, String> properties;
|
||||
synchronized(this) {
|
||||
properties = localProperties;
|
||||
}
|
||||
if(properties == null) return null;
|
||||
return createSocketAddress(properties);
|
||||
return createSocketAddress(localProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SocketAddress getSocketAddress(ContactId c) {
|
||||
Map<String, String> properties;
|
||||
synchronized(this) {
|
||||
properties = remoteProperties.get(c);
|
||||
}
|
||||
Map<String, String> properties = remoteProperties.get(c);
|
||||
if(properties == null) return null;
|
||||
return createSocketAddress(properties);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user