0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

fix "unimplemented" error when uplink is offline

This commit is contained in:
Alex Kocharin 2015-10-03 19:22:45 +03:00
parent 74e89e94e9
commit 602f17c8b2

View file

@ -103,6 +103,7 @@ Storage.prototype.request = function(options, cb) {
if (typeof(cb) === 'function') cb(Error('uplink is offline'))
req.emit('error', Error('uplink is offline'))
})
req._read = function(){}
// preventing 'Uncaught, unspecified "error" event'
req.on('error', function(){})
return req