active peer bug fix
This commit is contained in:
parent
328a3cc0ad
commit
5364edf9a3
|
@ -113,7 +113,9 @@ public class EthereumImpl implements Ethereum {
|
|||
@Override
|
||||
public void connect(String ip, int port) {
|
||||
logger.info("Connecting to: {}:{}", ip, port);
|
||||
new PeerClient().connect(ip, port);
|
||||
PeerClient peerClient = new PeerClient();
|
||||
WorldManager.getInstance().setActivePeer(peerClient);
|
||||
peerClient.connect(ip, port);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -100,7 +100,6 @@ public class PeerClient {
|
|||
|
||||
// Start the client.
|
||||
ChannelFuture f = b.connect().sync();
|
||||
WorldManager.getInstance().setActivePeer(this);
|
||||
|
||||
// Wait until the connection is closed.
|
||||
f.channel().closeFuture().sync();
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<dependency>
|
||||
<groupId>org.ethereum</groupId>
|
||||
<artifactId>ethereumj</artifactId>
|
||||
<version>0.7.2.20141025.0030</version>
|
||||
<version>0.7.2.20141025.0948</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
Loading…
Reference in New Issue