diff options
author | Nils Schwabe | 2014-08-25 14:55:48 +0200 |
---|---|---|
committer | Nils Schwabe | 2014-08-25 14:55:48 +0200 |
commit | ab02e581aefff5e075d60731e8c23f1ef24a695d (patch) | |
tree | 4264d8a9bf91343a5e5776e0a212f97f42a9f789 /src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java | |
parent | Add accidentally removed apostrophes back to DbImage (diff) | |
download | satellite-daemon-ab02e581aefff5e075d60731e8c23f1ef24a695d.tar.gz satellite-daemon-ab02e581aefff5e075d60731e8c23f1ef24a695d.tar.xz satellite-daemon-ab02e581aefff5e075d60731e8c23f1ef24a695d.zip |
Fix new thriftconnection things
Diffstat (limited to 'src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java')
-rw-r--r-- | src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java | 9 |
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; |