Like John said, it would be best to
have a reservoir / tank that the bypass
water can circulate through keeping it
from overheating and damaging pump
components.
There are pump thermal relief valves
available also, however a bypass back
to a tank of about 15 gallon or more
capacity would be better.
