Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

SPY-90: getStats() can return an error

Change-Id: Ida7f9ec4aa101873d464a42db9e5b2b55f2910fa
Reviewed-on: http://review.couchbase.org/17028
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
  • Loading branch information...
commit 40f700f7ed4e4530cac831b30fd5bba68236cc0b 1 parent cead32e
@mikewied mikewied authored
View
4 src/main/java/net/spy/memcached/protocol/binary/StatsOperationImpl.java
@@ -25,6 +25,7 @@
import java.io.IOException;
import net.spy.memcached.ops.OperationState;
+import net.spy.memcached.ops.OperationStatus;
import net.spy.memcached.ops.StatsOperation;
/**
@@ -56,7 +57,8 @@ protected void finishedPayload(byte[] pl) throws IOException {
Callback cb = (Callback) getCallback();
cb.gotStat(new String(keyBytes, "UTF-8"), new String(data, "UTF-8"));
} else {
- getCallback().receivedStatus(STATUS_OK);
+ OperationStatus status = getStatusForErrorCode(errorCode, pl);
+ getCallback().receivedStatus(status);
transitionState(OperationState.COMPLETE);
}
resetInput();
Please sign in to comment.
Something went wrong with that request. Please try again.