mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-31 15:22:16 +00:00
Don't allow setting writeTarget twice.
This commit is contained in:
parent
4b035535e2
commit
abe9513dde
@ -189,9 +189,11 @@ public abstract class PeerSocketHandler extends AbstractTimeoutHandler implement
|
||||
*/
|
||||
@Override
|
||||
public void setWriteTarget(MessageWriteTarget writeTarget) {
|
||||
checkArgument(writeTarget != null);
|
||||
lock.lock();
|
||||
boolean closeNow = false;
|
||||
try {
|
||||
checkArgument(this.writeTarget == null);
|
||||
closeNow = closePending;
|
||||
this.writeTarget = writeTarget;
|
||||
} finally {
|
||||
|
Loading…
Reference in New Issue
Block a user