Free resources when 'nget.noatomic' thread terminates
[ric-plt/dbaas.git] / redismodule / src / exstrings.c
index 4211f56..11102d3 100755 (executable)
@@ -774,6 +774,8 @@ int Nget_RedisCommand(RedisModuleCtx *ctx, NgetArgs* nget_args, bool using_threa
  */
 void *NGet_NoAtomic_ThreadMain(void *arg)
 {
+    pthread_detach(pthread_self());
+
     RedisModuleBlockedClientArgs *bca = arg;
     RedisModuleBlockedClient *bc = bca->bc;
     RedisModuleCtx *ctx = RedisModule_GetThreadSafeContext(bc);