summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorSimon Rettberg2024-01-16 14:58:31 +0100
committerSimon Rettberg2024-01-16 14:58:31 +0100
commit755bdaaf40f8c357d73b1db65ef95b6be26c240c (patch)
tree9074e033e91a564e812713293e01431414d5ddbf /src/main/java
parentSilence fileserver connection drop spam (diff)
downloadmaster-sync-shared-755bdaaf40f8c357d73b1db65ef95b6be26c240c.tar.gz
master-sync-shared-755bdaaf40f8c357d73b1db65ef95b6be26c240c.tar.xz
master-sync-shared-755bdaaf40f8c357d73b1db65ef95b6be26c240c.zip
Thrift: Avoid creating TWrapper for null-client
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/openslx/thrifthelper/ThriftHandler.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/openslx/thrifthelper/ThriftHandler.java b/src/main/java/org/openslx/thrifthelper/ThriftHandler.java
index e73c0ec..37c2897 100644
--- a/src/main/java/org/openslx/thrifthelper/ThriftHandler.java
+++ b/src/main/java/org/openslx/thrifthelper/ThriftHandler.java
@@ -176,7 +176,10 @@ class ThriftHandler<T extends TServiceClient> implements InvocationHandler
}
// No usable existing connection, create new client
LOGGER.debug( "Creating new thrift client" );
- return new TWrap<T>( clientFactory.getNewClient() );
+ T client = clientFactory.getNewClient();
+ if ( client == null )
+ return null;
+ return new TWrap<T>( client );
}
/**