fixed an issue, around sending exceptions back to the stateless client from the server

This commit is contained in:
Rob Austin
2015-05-14 10:50:09 +01:00
parent 549c499211
commit d48b683eed
2 changed files with 31 additions and 2 deletions
@@ -1818,12 +1818,16 @@ class StatelessServerConnector<K, V> {
@Nullable
private Work sendException(@NotNull TcpReplicator.TcpSocketChannelEntryWriter writer,
long sizeLocation, @NotNull Throwable e) {
LOG.error("cause by remote stateless client call", e);
// move the position to ignore any bytes written so far
writer.in().position(sizeLocation + HEADER_SIZE);
writeException(writer, e);
writeSizeAndFlags(sizeLocation + SIZE_OF_TRANSACTION_ID, true, writer.in());
writeSizeAndFlags(sizeLocation, true, writer.in());
return null;
}