Skip to content
Merged
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 @@ -281,9 +281,6 @@ public synchronized void setResponse(Message m, final CellScanner cells, Throwab
}
}
bc = new BufferChain(responseBufs);
if (connection.useWrap) {
bc = wrapWithSasl(bc);
}
} catch (IOException e) {
RpcServer.LOG.warn("Exception while creating response " + e);
}
Expand Down Expand Up @@ -547,6 +544,20 @@ public int getRemotePort() {

@Override
public synchronized BufferChain getResponse() {
return response;
if (connection.useWrap) {
/*
* wrapping result with SASL as the last step just before sending it out, so
* every message must have the right increasing sequence number
*/
try {
return wrapWithSasl(response);
} catch (IOException e) {
/* it is exactly the same what setResponse() does */
RpcServer.LOG.warn("Exception while creating response " + e);
return null;
}
} else {
return response;
}
}
}