|
|
@@ -110,7 +110,7 @@ redisContext* module::redis_pool::reget(redisContext* ctx)
|
|
|
return context;
|
|
|
}
|
|
|
|
|
|
-sol::object module::redis_pool::reply(sol::this_state* ts,redisContext* ctx, redisReply* reply)
|
|
|
+sol::object module::redis_pool::reply(sol::this_state* ts,redisContext* ctx, redisReply* reply,bool in)
|
|
|
{
|
|
|
if (reply == NULL) {
|
|
|
if (ctx->err)
|
|
|
@@ -156,10 +156,13 @@ sol::object module::redis_pool::reply(sol::this_state* ts,redisContext* ctx, red
|
|
|
}
|
|
|
catch (const std::exception& e)
|
|
|
{
|
|
|
- freeReplyObject(reply);
|
|
|
+ if(in)
|
|
|
+ freeReplyObject(reply);
|
|
|
+
|
|
|
throw ylib::exception(e.what());
|
|
|
}
|
|
|
- freeReplyObject(reply);
|
|
|
+ if(in)
|
|
|
+ freeReplyObject(reply);
|
|
|
return result;
|
|
|
}
|
|
|
|