title: Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
body: <p>Context:</p>
  
  <p>I've created what I called a softmodem-poetry machine, using two softmodems transmitters to transmit synchronously two different twitter streams at the same baud rate, creating an entanglement of quasi-gibberish/quasi-legible signals coming both from softmodem 1 and softmodem 2. These programs were running three months ago.</p>
  
  <p>Problem:</p>
  
  <p>When I try running these programs now, I have this <code>Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed</code> as soon as I connect to my socket.</p>
  
  <p>Here's the relevant code I think:</p>
  
  <pre><code>twit.stream("statuses/filter", { track: randomTitle}, function(stream) {
        stream.on("data", function(data) {
          socket.emit("tweet", data.text);
          child.stdin.write(data.text);
        });
  });`
  </code></pre>
  
  <p>Here's the entire code: <a href="https://github.com/cyruslk/twitter_minimodem/blob/master/app.js" rel="noreferrer">https://github.com/cyruslk/twitter_minimodem/blob/master/app.js</a></p>