From 543f9ef5754bf50bc1817cfe9ddc13201f4e009f Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Thu, 29 Jul 2010 03:09:38 +0000 Subject: libglusterfs: Prevent multiple timer threads from being spawned Signed-off-by: Vijay Bellur Signed-off-by: Anand V. Avati BUG: 1246 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1246 --- libglusterfs/src/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libglusterfs/src/timer.c b/libglusterfs/src/timer.c index 3e39231e0..433eeb7df 100644 --- a/libglusterfs/src/timer.c +++ b/libglusterfs/src/timer.c @@ -220,8 +220,8 @@ gf_timer_registry_init (glusterfs_ctx_t *ctx) reg->stale.next = ®->stale; reg->stale.prev = ®->stale; - pthread_create (®->th, NULL, gf_timer_proc, ctx); ctx->timer = reg; + pthread_create (®->th, NULL, gf_timer_proc, ctx); } out: return ctx->timer; -- cgit