Breaking a while loop

@pggood, do not hijack. Thread split.

@pggood, do not cross-post. Threads merged.