active peer bug fix

This commit is contained in:
romanman 2014-10-25 09:57:41 -05:00
parent 328a3cc0ad
commit 5364edf9a3
3 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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();

View File

@ -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>