原来是pipe，req read end的时候会出发ws write end
2014年2月23日 AM10:55于 "dead_horse" <notifications@github.com>写道：

> In controllers/registry/module.js:
>
> > +    this.body = {
> > +      error: 'rev_wrong',
> > +      reason: 'rev not match next module'
> > +    };
> > +    return;
> > +  }
> > +  var filepath = common.getTarballFilepath(filename);
> > +  var ws = fs.createWriteStream(filepath);
> > +  var shasum = crypto.createHash('sha1');
> > +  var dataSize = 0;
> > +
> > +  var buf;
> > +  while(buf = yield coRead(this.req)) {
> > +    shasum.update(buf);
> > +    dataSize += buf.length;
> > +    coWrite(ws, buf);
>
> 要yiled,漏了
>
> ws 在这里好像不会触发end?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/cnpm/cnpmjs.org/pull/201/files#r9974135>
> .
>