add mutex in map and update client.cpp