Skip to content
Browse files

Merge pull request #4 from hannesgassert/master

Handle HTTP client errors
2 parents e99adcb + a97e75e commit 3e38578985812931e361c78165d62fda30a30064 @iasandcb iasandcb committed Mar 28, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/gcm.js
View
3 lib/gcm.js
@@ -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.
Something went wrong with that request. Please try again.