Avoid superfluous calls to NotifyOnStop

Calling NotifyOnStop in a while loop creates a new go routine and channel each time, which is an unnecessary waste.