Skip to content

Commit

Permalink
try to fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
miniflycn committed Oct 10, 2013
1 parent 18e4cff commit 539400d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/vaild.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,15 @@ module.exports = (function () {
req = httpLib.request(opts, function (res) {
var statusCode = res.statusCode;
if (statusCode === 200) {
that.fetch ? res.on('data', function (data) {
that.emitter.emit('data', null, data);
}) : req.abort();
that.emitter.emit('check', null, true);

res.on('end', function () {
that.emitter.emit('end');
});

that.fetch ? res.on('data', function (data) {
that.emitter.emit('data', null, data);
}) : req.abort();
} else if (300 < statusCode && statusCode < 304) {
req.abort();
var emitter = that.emitter
Expand Down

0 comments on commit 539400d

Please sign in to comment.