mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-12 10:15:52 +00:00
ConnectionHandler: Make comment a bit clearer.
This commit is contained in:
parent
c5cb306927
commit
9e56093353
@ -86,7 +86,9 @@ class ConnectionHandler implements MessageWriteTarget {
|
|||||||
public ConnectionHandler(StreamParser parser, SelectionKey key, Set<ConnectionHandler> connectedHandlers) {
|
public ConnectionHandler(StreamParser parser, SelectionKey key, Set<ConnectionHandler> connectedHandlers) {
|
||||||
this(checkNotNull(parser), key);
|
this(checkNotNull(parser), key);
|
||||||
|
|
||||||
// closeConnection() may have already happened, in which case we shouldn't add ourselves to the connectedHandlers set
|
// closeConnection() may have already happened because we invoked the other c'tor above, which called
|
||||||
|
// parser.setWriteTarget which might have re-entered already. In this case we shouldn't add ourselves
|
||||||
|
// to the connectedHandlers set.
|
||||||
lock.lock();
|
lock.lock();
|
||||||
boolean alreadyClosed = false;
|
boolean alreadyClosed = false;
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user