title: Can Node.js "built-in" streams emit multiple errors?
body: <p>If I get a <a href="https://nodejs.org/dist/latest-v4.x/docs/api/stream.html#stream_class_stream_readable" rel="nofollow"><code>stream.Readable</code></a> or <a href="https://nodejs.org/dist/latest-v4.x/docs/api/stream.html#stream_class_stream_writable" rel="nofollow"><code>stream.Writable</code></a>, for example after calling <a href="https://nodejs.org/dist/latest-v4.x/docs/api/http.html#http_class_http_incomingmessage" rel="nofollow"><code>http.IncomingMessage</code></a>, <a href="https://nodejs.org/dist/latest-v4.x/docs/api/fs.html#fs_class_fs_readstream" rel="nofollow"><code>fs.ReadStream</code></a> or <a href="https://nodejs.org/dist/latest-v4.x/docs/api/fs.html#fs_class_fs_writestream" rel="nofollow"><code>fs.WriteStream</code></a>, should I assume that <em>all</em> events may fire multiple times, unless the documentation says otherwise?</p>
  
  <p>I'm especially interested in the answer to these questions:</p>
  
  <ol>
  <li>Can an <code>error</code> event fire multiple times?</li>
  <li>If an <code>error</code> event is emitted, what other events can still happen? (e.g. <code>data</code>?)</li>
  </ol>
  
  <p>The questions assume:</p>
  
  <ul>
  <li>The <code>error</code> event is caught and doesn't throw.</li>
  <li>No third-party libraries are used.</li>
  </ul>
  
  <h1>Code samples</h1>
  
  <pre><code>var options = {
    method: 'GET',
    host: 'localhost',
    path: '/',
  };
  
  require('http').get(options, function(response) {
    // ...
  
    response.on('end', callback);
    response.on('error', callback);
  
    // ...
  });
  
  function callback() {
    // Can this function be called multiple times?
  }
  </code></pre>
  
  <hr>
  
  <pre><code>var s = require('fs').createReadStream('/path/to/file');
  
  s.on('end', callback);
  s.on('error', callback);
  
  function callback() {
    // Can this function be called multiple times?
  }
  </code></pre>
  
  <hr>
  
  <pre><code>var s = require('fs').createWriteStream('/path/to/file');
  
  s.on('finish', callback);
  s.on('error', callback);
  
  function callback() {
    // Can this function be called multiple times?
  }
  </code></pre>