It’s perfectly OK to respond to unpleasant sense contacts by dealing appropriately with the situation. But in neither case should the sense contacts lead to craving and clinging; if they do, then the sense doors are unguarded, and progress on the spiritual path is hindered.