diff options
author | Simon Rettberg | 2024-01-16 14:58:31 +0100 |
---|---|---|
committer | Simon Rettberg | 2024-01-16 14:58:31 +0100 |
commit | 755bdaaf40f8c357d73b1db65ef95b6be26c240c (patch) | |
tree | 9074e033e91a564e812713293e01431414d5ddbf /src/main/java | |
parent | Silence fileserver connection drop spam (diff) | |
download | master-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.java | 5 |
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 ); } /** |