~ubuntu-branches/ubuntu/vivid/nodejs/vivid

« back to all changes in this revision

Viewing changes to lib/tls.js

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2013-11-13 23:17:51 UTC
  • mfrom: (1.1.29)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20131113231751-m6uqywp5dc4s4fxo
Tags: 0.10.22~dfsg1-1
* Upstream update. 
* Refresh patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
506
506
    if (this.ondata) {
507
507
      this.ondata(pool, start, start + bytesRead);
508
508
 
509
 
      // Consume data automatically
510
 
      // simple/test-https-drain fails without it
511
 
      this.push(pool.slice(start, start + bytesRead));
512
 
      this.read(bytesRead);
 
509
      // Deceive streams2
 
510
      var self = this;
 
511
 
 
512
      setImmediate(function() {
 
513
        // Force state.reading to set to false
 
514
        self.push('');
 
515
 
 
516
        // Try reading more, we most likely have some data
 
517
        self.read(0);
 
518
      });
513
519
    } else {
514
520
      this.push(pool.slice(start, start + bytesRead));
515
521
    }