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
@@ -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:
