Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promise not returned on drain #287

Closed
alexu84 opened this issue Sep 13, 2016 · 0 comments
Closed

Promise not returned on drain #287

alexu84 opened this issue Sep 13, 2016 · 0 comments

Comments

@alexu84
Copy link

alexu84 commented Sep 13, 2016

My code is something like:

request({ method: 'GET', url: url, qs: qs })
    .pipe(parse)
    .pipe(transform)
    .pipe(db)
    .on('finish', () => { r.getPool().drain(); });

I receive this Warning:

Warning: a promise was created in a handler at Users/alex/Projects/turismatic-flights-static-import/node_modules/rethinkdbdash/lib/writable_stream.js:124:7 but was not returned from it, see http://goo.gl/rRqMUw
    at new Promise (/Users/alex/Projects/turismatic-flights-static-import/node_modules/bluebird/js/release/promise.js:77:14)
    at tryOnImmediate (timers.js:534:15)
    at processImmediate [as _immediateCallback] (timers.js:514:5)
From previous event:
    at Pool.drain (/Users/alex/Projects/turismatic-flights-static-import/node_modules/rethinkdbdash/lib/pool.js:376:11)
    at Object.module.exports.init.close (/Users/alex/Projects/turismatic-flights-static-import/lib/lib.js:17:17)
    at WritableStream.<anonymous> (/Users/alex/Projects/turismatic-flights-static-import/lib/import.js:14:11)
    at emitNone (events.js:85:20)
    at WritableStream.emit (events.js:179:7)
    at finishMaybe (_stream_writable.js:481:14)
    at afterWrite (_stream_writable.js:355:3)
    at onwrite (_stream_writable.js:345:7)
    at WritableState.onwrite (_stream_writable.js:89:5)
    at /Users/alex/Projects/turismatic-flights-static-import/node_modules/rethinkdbdash/lib/writable_stream.js:124:7
From previous event:
    at WritableStream._insert (/Users/alex/Projects/turismatic-flights-static-import/node_modules/rethinkdbdash/lib/writable_stream.js:115:72)
    at WritableStream._next (/Users/alex/Projects/turismatic-flights-static-import/node_modules/rethinkdbdash/lib/writable_stream.js:83:14)
    at Immediate._onImmediate (/Users/alex/Projects/turismatic-flights-static-import/node_modules/rethinkdbdash/lib/writable_stream.js:89:16)
    at tryOnImmediate (timers.js:534:15)
    at processImmediate [as _immediateCallback] (timers.js:514:5)
thejsj added a commit to thejsj/rethinkdbdash that referenced this issue Dec 17, 2016
* 'master' of github.com:neumino/rethinkdbdash: (304 commits)
  Fix leaked variable from test
  Bump to 2.3.27
  Fix neumino#313
  Bump to 2.3.26
  fix: return null where new Promises are created but not returned
  Fix leak in tests
  Fix leak in tests
  Bump to 2.3.25
  Make identification errors operational such that they can be properly caught - Fix neumino#295
  Bump to 2.3.24
  Close the stream if an error is emitted since we can't recover frm it
  Remove the use of Buffer with new for node 7 - Fix neumino#304
  Wrap sending the proof in a try/catch in case the connection is closed - Fix neumino#296
  Bump to 2.3.23
  Prevent bluebird warning - Fix neumino#287
  Bump to 2.3.22
  Prevent bluebird warning - Fix neumino#285
  function r: remove unused parameter `options`
  readme: minor typo fix
  Bump to 2.3.21
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant