Terminate program if exit is set

The program should terminate if the exit flag is set, but it only
terminates the current stream. Don't run subsequent streams if the exit
flag is set.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>