recordSpan = (stream) => {
    serverConnections++

    // drain reads to make sure everything finishes properly
    stream.on('data', () => {
      // Writing data critical for triggering bug.
      stream.write({ messages_seen: 1 })

      // end the stream -- sends back a STATUS OK
      stream.end()
    })
  }
With Node streams, when the server sends back data and we are not subscribed to the
data event, the status event never fires thus preventing reconnects. This results in
us being pinned to a bad stream and throwing 'ERR_STREAM_WRITE_AFTER_END' errors.