other shared objects where created in the I/O thread in createStringObjectFromLongLong. Fixed as well.

This commit is contained in:
antirez 2010-07-22 14:48:45 +02:00
parent cdbea20afb
commit e002ec6801

View File

@ -35,7 +35,8 @@ robj *createStringObject(char *ptr, size_t len) {
robj *createStringObjectFromLongLong(long long value) {
robj *o;
if (value >= 0 && value < REDIS_SHARED_INTEGERS) {
if (value >= 0 && value < REDIS_SHARED_INTEGERS &&
pthread_equal(pthread_self(),server.mainthread)) {
incrRefCount(shared.integers[value]);
o = shared.integers[value];
} else {