mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-25 15:10:18 +01:00
Fix reentrance bug when writing in connectionOpened.
This commit is contained in:
parent
ba543a3b10
commit
c10ebd260c
1 changed files with 1 additions and 1 deletions
|
@ -56,8 +56,8 @@ public class NioClientManager extends AbstractExecutionThreadService implements
|
|||
try {
|
||||
if (sc.finishConnect()) {
|
||||
log.info("Successfully connected to {}", sc.socket().getRemoteSocketAddress());
|
||||
handler.parser.connectionOpened();
|
||||
key.interestOps(SelectionKey.OP_READ).attach(handler);
|
||||
handler.parser.connectionOpened();
|
||||
} else {
|
||||
log.error("Failed to connect to {}", sc.socket().getRemoteSocketAddress());
|
||||
handler.closeConnection(); // Failed to connect for some reason
|
||||
|
|
Loading…
Add table
Reference in a new issue