diff --git a/src/main/java/net/spy/memcached/protocol/ascii/StatsOperationImpl.java b/src/main/java/net/spy/memcached/protocol/ascii/StatsOperationImpl.java index ee10682d5..2c09222c1 100644 --- a/src/main/java/net/spy/memcached/protocol/ascii/StatsOperationImpl.java +++ b/src/main/java/net/spy/memcached/protocol/ascii/StatsOperationImpl.java @@ -35,7 +35,8 @@ final class StatsOperationImpl extends OperationImpl implements StatsOperation { private static final OperationStatus END = new OperationStatus(true, "END"); - + private static final OperationStatus RESET = new OperationStatus(true, "RESET"); + private static final byte[] MSG = "stats\r\n".getBytes(); private final byte[] msg; @@ -56,6 +57,10 @@ public void handleLine(String line) { if (line.equals("END")) { cb.receivedStatus(END); transitionState(OperationState.COMPLETE); + } else if (line.equals("RESET")) { + // The server responds to "stats reset" with "RESET" + cb.receivedStatus(RESET); + transitionState(OperationState.COMPLETE); } else { String[] parts = line.split(" ", 3); assert parts.length == 3;