summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/satellitedaemon/filetransfer
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/openslx/satellitedaemon/filetransfer')
-rw-r--r--src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
index b813f15..ed08c85 100644
--- a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
+++ b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
@@ -15,7 +15,8 @@ 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.TNonblockingSocket;
+import org.apache.thrift.transport.TFramedTransport;
+import org.apache.thrift.transport.TSocket;
import org.apache.thrift.transport.TTransport;
import org.openslx.imagemaster.crcchecker.CrcFile;
import org.openslx.imagemaster.thrift.iface.AuthorizationError;
@@ -388,15 +389,15 @@ public class ThriftConnection {
private static ImageServer.Client newClient() throws IOException {
ImageServer.Client newClient = null;
try {
- TTransport transport;
- transport = new TNonblockingSocket(
+ TTransport transport = new TFramedTransport( new TSocket(
Globals.getMasterserverHost(),
- Globals.getThriftPort());
+ Globals.getThriftPort()));
transport.open();
TProtocol protocol = new TBinaryProtocol(transport);
newClient = new ImageServer.Client(protocol);
log.debug("ThriftConnection: Made a new Client");
} catch (TException x) {
+ // TODO: Exception handling
log.error("ThriftConnection coudn't create new client.");
x.printStackTrace();
return null;