NIFI-6517: Ensure that if IOException is thrown from LoadBalanceSession that we properly catch the Exception, mark session as complete, and then re-throw. There was one condition in which this was not occurring. This commit addresses that situation.

This closes #3626.

Signed-off-by: Bryan Bende <bbende@apache.org>
This commit is contained in:
Mark Payne 2019-08-01 13:39:50 -04:00 committed by Bryan Bende
parent 639e81e5a1
commit a9a4b765b1
No known key found for this signature in database
GPG Key ID: A0DDA9ED50711C39
1 changed files with 7 additions and 7 deletions

View File

@ -136,6 +136,7 @@ public class LoadBalanceSession {
return false;
}
try {
// If there's already a data frame prepared for writing, just write to the channel.
if (preparedFrame != null && preparedFrame.hasRemaining()) {
logger.trace("Current Frame is already available. Will continue writing current frame to channel");
@ -143,7 +144,6 @@ public class LoadBalanceSession {
return bytesWritten > 0;
}
try {
// Check if the phase is one that needs to receive data and if so, call the appropriate method.
switch (phase) {
case RECEIVE_SPACE_RESPONSE: