fix a deadlock bug in client
Merge pull request #62 from LantaoJin/master

fix a deadlock bug in client