server: Clear the thread wait before releasing objects to avoid nested calls.