From 71697ad7329350604f516963dc0c4985e82677a2 Mon Sep 17 00:00:00 2001 From: Nils Schwabe Date: Mon, 18 Aug 2014 14:56:00 +0200 Subject: Change TSocket to TNonBlockingServerTransport --- .../org/openslx/satellitedaemon/filetransfer/ThriftConnection.java | 7 ++++--- 1 file 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 ); -- cgit v1.2.3-55-g7522