diff options
author | Nils Schwabe | 2014-08-18 14:56:00 +0200 |
---|---|---|
committer | Nils Schwabe | 2014-08-18 14:56:00 +0200 |
commit | 71697ad7329350604f516963dc0c4985e82677a2 (patch) | |
tree | 6dcd1eb4e1c856d25da44e5bda0c4d652e685fff | |
parent | CRCFile -> CrcFile (diff) | |
download | satellite-daemon-71697ad7329350604f516963dc0c4985e82677a2.tar.gz satellite-daemon-71697ad7329350604f516963dc0c4985e82677a2.tar.xz satellite-daemon-71697ad7329350604f516963dc0c4985e82677a2.zip |
Change TSocket to TNonBlockingServerTransport
-rw-r--r-- | src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java | 7 |
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 ); |