Skip to content

Commit

Permalink
Return the error on the executor
Browse files Browse the repository at this point in the history
  • Loading branch information
spkrka committed May 28, 2015
1 parent cd98cc4 commit 733bf02
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ public <T> ListenableFuture<T> send(final Request<T> request) {
SetRequest setRequest = (SetRequest) request;
byte[] value = setRequest.getValue();
if (value.length > maxSetLength) {
return (ListenableFuture<T>) Futures.immediateFuture(MemcacheStatus.VALUE_TOO_LARGE);
return (ListenableFuture<T>) onExecutor(
Futures.immediateFuture(MemcacheStatus.VALUE_TOO_LARGE));
}
}
channel.write(request, new RequestWritePromise(channel, request));
Expand Down

0 comments on commit 733bf02

Please sign in to comment.