Monitor the receiver and exit if it terminates

We want the connection to be sure the receiver is there to get
messages, but only while the connection is open(ed).