Certified GKH Gardening Expert
This can happen due to a lack of phosphorous and potassium, or because of too much nitrogen in the soil. These plants fix their own nitrogen, so adding more will usually stop flowering. It can be possible to negate this with dolomitic lime, but it would be best to pair this will potassium phosphate, or any bloom booster. I usually don't like to recommend certain products, but foxfarm makes a product for blooming called BeastieBloomz. You don't need the other two parts to the system. Just this one, as it does not contain nitrogen at all, where the other two do.
Using dolomitic lime and BeastieBloomz will completely correct this issue, and I am recommending this because it will, immensely, increase flower and fruit set on any plant. I have personally tested this on hundreds of plant types with no problems, as long as I always use it at 1/4 strength mixed in water for soil. I feel this is more effective than their recommended strength for most plants.