diff --git a/server/core/poll.c b/server/core/poll.c index e3decdba0..22a4ad302 100644 --- a/server/core/poll.c +++ b/server/core/poll.c @@ -682,6 +682,8 @@ process_zombies: thread_data[thread_id].state = THREAD_STOPPED; } bitmask_clear(&poll_mask, thread_id); + /** Release mysql thread context */ + mysql_thread_end(); return; } if (thread_data) @@ -689,8 +691,6 @@ process_zombies: thread_data[thread_id].state = THREAD_IDLE; } } /*< while(1) */ - /** Release mysql thread context */ - mysql_thread_end(); } /**