pouchdb-community / socket-pouch

PouchDB and CouchDB over WebSockets, using Engine.io
Apache License 2.0
207 stars 45 forks source link

Error using redisdown #5

Closed brandonros closed 9 years ago

brandonros commented 9 years ago

Not sure if this is redisdown related or not, but changing

function addUncaughtErrorHandler(db, socket) {
  return db.then(function (res) {
    res.pouch.on('error', function (err) {
      sendUncaughtError(socket, err);
    });
  });
}

to

function addUncaughtErrorHandler(db, socket) {
  return db.pouch.then(function (res) {
    res.on('error', function (err) {
      sendUncaughtError(socket, err);
    });
  });
} 

made it work.

nolanlawson commented 9 years ago

Putting a then() handler on a pouch is deprecated behavior, also I have no idea why Redisdown would behave differently, but I'm 99% sure this is related to https://github.com/pouchdb/express-pouchdb/issues/264

nolanlawson commented 9 years ago

Please find steps to repro and re-file if it is indeed a bug in this plugin, but I'm fairly certain it's a bug in redisdown instead.