add locks for monitor
Merge branch 'master' of https://github.com/peigen831/ChatSockets