소스 검색

Lock mutex in timers_exit

bel 8 년 전
부모
커밋
44b5590f17
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/timer.inl

+ 1 - 0
src/timer.inl

@@ -181,6 +181,7 @@ static void
 timers_exit(struct mg_context *ctx)
 {
 	if (ctx->timers) {
+        pthread_mutex_lock(&ctx->timers->mutex);
 		ctx->timers->timer_count = 0;
 		(void)pthread_mutex_destroy(&ctx->timers->mutex);
 		mg_free(ctx->timers);