Skip to content

Commit

Permalink
Merge pull request #4 from hannesgassert/master
Browse files Browse the repository at this point in the history
Handle HTTP client errors
  • Loading branch information
iasandcb committed Mar 28, 2013
2 parents e99adcb + a97e75e commit 3e38578
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/gcm.js
Expand Up @@ -93,6 +93,9 @@ GCM.prototype.send = function(packet, cb) {
res.on('end', respond);
res.on('close', respond);
});
request.on('error', function(error) {
self.emit('sent', error, null);
});
request.end(postData);
});
};

0 comments on commit 3e38578

Please sign in to comment.