mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-12 10:15:52 +00:00
Use unconnected socket in BlockingClient as before
This commit is contained in:
parent
23da335e57
commit
9cfb420cdb
@ -66,6 +66,7 @@ public class BlockingClient implements MessageWriteTarget {
|
||||
// sure it doesnt get too large or have to call read too often.
|
||||
dbuf = ByteBuffer.allocateDirect(Math.min(Math.max(parser.getMaxMessageSize(), BUFFER_SIZE_LOWER_BOUND), BUFFER_SIZE_UPPER_BOUND));
|
||||
parser.setWriteTarget(this);
|
||||
socket = socketFactory.createSocket();
|
||||
Thread t = new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -73,8 +74,7 @@ public class BlockingClient implements MessageWriteTarget {
|
||||
clientSet.add(BlockingClient.this);
|
||||
try {
|
||||
InetSocketAddress iServerAddress = (InetSocketAddress)serverAddress;
|
||||
socket = socketFactory.createSocket(iServerAddress.getAddress(), iServerAddress.getPort());
|
||||
//socket.connect(serverAddress, connectTimeoutMillis);
|
||||
socket.connect(serverAddress, connectTimeoutMillis);
|
||||
parser.connectionOpened();
|
||||
InputStream stream = socket.getInputStream();
|
||||
byte[] readBuff = new byte[dbuf.capacity()];
|
||||
|
Loading…
x
Reference in New Issue
Block a user