BF/Pump Question

Sy👶🏽🎀
My 4 month old only nurses from one side & the LC told me I should pump the other side. 
Now,
Am I pumping the other side WHILE she nurses on the other or when she's done nursing ? 
I thought pumping while nursing caused mastasis? 
Thanks.