Disconnection vs termination
In the example above, quitting r6 disconnects Query D from stream 4. Because stream 4 has other stream queries using it this disconnection does not terminate stream 4 immediately. Streams terminate when all the queries using them have disconnected.
If you were instead to call quit() on r4, this would terminate everything on the right side of the diagram, no matter how many queries are using stream 4. However, the stream would just be disconnected from Query C. Whether this terminates Query C depends on the state of the join in Query C. If it is joining a size-based window from stream 4 the items in the window would remain to be joined against new items in stream 3. If it was a time-based window then Query C would remain until everything in the window had been discarded. At that point, since nothing can ever be added to that side of a join, Query C terminates, causing the rest of the network to also be terminated.