mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-12 02:05:53 +00:00
Make PeerGroup.maxConnections fully synchronized.
This commit is contained in:
parent
fd9eba1697
commit
5bae8ffe6c
@ -211,12 +211,12 @@ public class PeerGroup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** The maximum number of connections that we will create to peers. */
|
/** The maximum number of connections that we will create to peers. */
|
||||||
public void setMaxConnections(int maxConnections) {
|
public synchronized void setMaxConnections(int maxConnections) {
|
||||||
this.maxConnections = maxConnections;
|
this.maxConnections = maxConnections;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The maximum number of connections that we will create to peers. */
|
/** The maximum number of connections that we will create to peers. */
|
||||||
public int getMaxConnections() {
|
public synchronized int getMaxConnections() {
|
||||||
return maxConnections;
|
return maxConnections;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user