3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 15:22:16 +00:00

Fix TCPNetworkConnection.connectTo() which broke during a previous re-factor. It's not often used so it wasn't noticed.

This commit is contained in:
Mike Hearn 2013-03-29 17:34:23 +00:00
parent 89d45b638f
commit 41ce887652

View File

@ -110,9 +110,10 @@ public class TCPNetworkConnection implements NetworkConnection {
ChannelPipeline pipeline = Channels.pipeline();
final TCPNetworkConnection conn = new TCPNetworkConnection(params, new VersionMessage(params, 0));
conn.handshakeFuture = SettableFuture.create();
conn.setRemoteAddress(address);
pipeline.addLast("codec", conn.getHandler());
clientBootstrap.setPipeline(pipeline);
clientBootstrap.setOption("connectTimeoutMillis", Integer.valueOf(connectTimeoutMsec));
clientBootstrap.setOption("connectTimeoutMillis", connectTimeoutMsec);
ChannelFuture socketFuture = clientBootstrap.connect(address);
// Once the socket is either connected on the TCP level, or failed ...
socketFuture.addListener(new ChannelFutureListener() {