make Director::end() reantrant
Merge pull request #3698 from minggo/develop

make Director::end() reantrant