Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow unknown cmd to not send data back to the caller

Change-Id: Id2cea1f4feeb5567218998f3dade48a81c900ad4
  • Loading branch information...
commit 9df3289295314b76bf4c482024cb0f0f253bcdcb 1 parent 72df1cc
@trondn trondn authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 memcached.c
View
8 memcached.c
@@ -2515,8 +2515,12 @@ static void process_bin_unknown_packet(conn *c) {
}
if (ret == ENGINE_SUCCESS) {
- write_and_free(c, c->dynamic_buffer.buffer, c->dynamic_buffer.offset);
- c->dynamic_buffer.buffer = NULL;
+ if (c->dynamic_buffer.buffer != NULL) {
+ write_and_free(c, c->dynamic_buffer.buffer, c->dynamic_buffer.offset);
+ c->dynamic_buffer.buffer = NULL;
+ } else {
+ conn_set_state(c, conn_new_cmd);
+ }
} else if (ret == ENGINE_ENOTSUP) {
write_bin_packet(c, PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND, 0);
} else if (ret == ENGINE_EWOULDBLOCK) {
Please sign in to comment.
Something went wrong with that request. Please try again.