Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ public synchronized boolean communicate() throws IOException {
return false;
}

// 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");
final int bytesWritten = channel.write(preparedFrame);
return bytesWritten > 0;
}

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");
final int bytesWritten = channel.write(preparedFrame);
return bytesWritten > 0;
}

// Check if the phase is one that needs to receive data and if so, call the appropriate method.
switch (phase) {
case RECEIVE_SPACE_RESPONSE:
Expand Down