Move copying of session map out of mutex.