Skip to content

Commit 9f8724b

Browse files
author
Andrei Zmievski
committed
Better check for compression flag.
1 parent 913d2e5 commit 9f8724b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php_memcached.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1974,7 +1974,7 @@ static char *php_memc_zval_to_payload(zval *value, size_t *payload_len, uint32_t
19741974
}
19751975

19761976
/* turn off compression for values below the threshold */
1977-
if (buf.len < MEMC_COMPRESS_THRESHOLD) {
1977+
if ((*flags & MEMC_VAL_COMPRESSED) && buf.len < MEMC_COMPRESS_THRESHOLD) {
19781978
*flags &= ~MEMC_VAL_COMPRESSED;
19791979
}
19801980

0 commit comments

Comments
 (0)