summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
index 2f0ef46..4b95f9b 100644
--- a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
+++ b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
@@ -15,7 +15,7 @@ import org.apache.log4j.Logger;
import org.apache.thrift.TException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.transport.TSocket;
+import org.apache.thrift.transport.TNonblockingSocket;
import org.apache.thrift.transport.TTransport;
import org.openslx.imagemaster.crcchecker.CrcFile;
import org.openslx.imagemaster.thrift.iface.AuthorizationError;
@@ -371,13 +371,14 @@ public class ThriftConnection
/**
*
* @return
+ * @throws IOException
*/
- private static ImageServer.Client newClient()
+ private static ImageServer.Client newClient() throws IOException
{
ImageServer.Client newClient = null;
try {
TTransport transport;
- transport = new TSocket( Globals.getPropertyString( PropString.FILETRANSFERSERVERIP ), Globals.getPropertyInt( PropInt.THRIFTPORT ) );
+ transport = new TNonblockingSocket( Globals.getPropertyString( PropString.FILETRANSFERSERVERIP ), Globals.getPropertyInt( PropInt.THRIFTPORT ) );
transport.open();
TProtocol protocol = new TBinaryProtocol( transport );
newClient = new ImageServer.Client( protocol );