Only end the messages stream when we trigger onclose.
Implement the draft-76 protocol.