重构client manager