Code

frontend: Reset the current command length on CONNECTION_IDLE.
authorSebastian Harl <sh@tokkee.org>
Thu, 24 Apr 2014 07:31:59 +0000 (09:31 +0200)
committerSebastian Harl <sh@tokkee.org>
Thu, 24 Apr 2014 07:31:59 +0000 (09:31 +0200)
src/frontend/connection.c

index 3d288410ee357ae4317477e255791afbc5bb5251..a146e29711c3aa1cc4de78f59672d43ee52091e6 100644 (file)
@@ -375,8 +375,10 @@ command_init(sdb_conn_t *conn)
        conn->cmd_len = connection_get_int32(conn, sizeof(uint32_t));
 
        len = 2 * sizeof(uint32_t);
-       if (conn->cmd == CONNECTION_IDLE)
+       if (conn->cmd == CONNECTION_IDLE) {
                len += conn->cmd_len;
+               conn->cmd_len = 0;
+       }
        sdb_strbuf_skip(conn->buf, 0, len);
        return 0;
 } /* command_init */