ijokarumawak commented on a change in pull request #3647: NIFI-6530 - HTTP 
SiteToSite server returns 201 in case no data is ava…
URL: https://github.com/apache/nifi/pull/3647#discussion_r321066722
 
 

 ##########
 File path: 
nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/SocketClient.java
 ##########
 @@ -125,15 +126,15 @@ public Transaction createTransaction(final 
TransferDirection direction) throws I
         }
 
         final EndpointConnection connectionState = 
pool.getEndpointConnection(direction, getConfig());
-        if (connectionState == null) {
-            return null;
-        }
 
         final Transaction transaction;
         try {
             transaction = 
connectionState.getSocketClientProtocol().startTransaction(
                     connectionState.getPeer(), connectionState.getCodec(), 
direction);
-        } catch (final Throwable t) {
+        } catch (final NoContentException e) {
+            return null;
+        }
+        catch (final Throwable t) {
 
 Review comment:
   The previous closing curly bracket and this `catch` should be in the same 
line.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to