|  | @@ -167,9 +167,9 @@ timer_thread_run(void *thread_func_param)
 | 
											
												
													
														|  |  		d = timer_getcurrenttime();
 |  |  		d = timer_getcurrenttime();
 | 
											
												
													
														|  |  	}
 |  |  	}
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -pthread_mutex_lock(&ctx->timers->mutex);
 |  | 
 | 
											
												
													
														|  | 
 |  | +	pthread_mutex_lock(&ctx->timers->mutex);
 | 
											
												
													
														|  |  	ctx->timers->timer_count = 0;
 |  |  	ctx->timers->timer_count = 0;
 | 
											
												
													
														|  | -pthread_mutex_unlock(&ctx->timers->mutex);
 |  | 
 | 
											
												
													
														|  | 
 |  | +	pthread_mutex_unlock(&ctx->timers->mutex);
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -210,12 +210,11 @@ timers_exit(struct mg_context *ctx)
 | 
											
												
													
														|  |  	if (ctx->timers) {
 |  |  	if (ctx->timers) {
 | 
											
												
													
														|  |  		pthread_mutex_lock(&ctx->timers->mutex);
 |  |  		pthread_mutex_lock(&ctx->timers->mutex);
 | 
											
												
													
														|  |  		ctx->timers->timer_count = 0;
 |  |  		ctx->timers->timer_count = 0;
 | 
											
												
													
														|  | -		/* TODO: Do we really need to unlock the mutex, before 
 |  | 
 | 
											
												
													
														|  | 
 |  | +		/* TODO: Do we really need to unlock the mutex, before
 | 
											
												
													
														|  |  		 * destroying it, if it's destroyed by the thread currently
 |  |  		 * destroying it, if it's destroyed by the thread currently
 | 
											
												
													
														|  |  		 * owning the mutex? */
 |  |  		 * owning the mutex? */
 | 
											
												
													
														|  | -		pthread_mutex_unlock(&ctx->timers->mutex); 
 |  | 
 | 
											
												
													
														|  | 
 |  | +		pthread_mutex_unlock(&ctx->timers->mutex);
 | 
											
												
													
														|  |  		(void)pthread_mutex_destroy(&ctx->timers->mutex);
 |  |  		(void)pthread_mutex_destroy(&ctx->timers->mutex);
 | 
											
												
													
														|  |  		mg_free(ctx->timers);
 |  |  		mg_free(ctx->timers);
 | 
											
												
													
														|  |  	}
 |  |  	}
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  | -
 |  | 
 |