monitor the process receiving messages while streaming to it.

When the process receiving the message we should make sure to close the
stream so we don't leak any memory or fds.