rethinkdb / rethinkdb-ts

RethinkDB TypeScript driver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node multipleResolves warning is firing on connect

murrayju opened this issue · comments

Describe the bug
The node warning event multipleResolves is being triggered shortly after connecting via r.connectPool().

To Reproduce
Steps to reproduce the behavior:

  1. Register the multipleResolves handler
  process.on('multipleResolves', (type, promise, reason) => {
    console.error('Node<multipleResolves>', { type, reason });
  });
  1. Connect to a db
  2. Wait about 20 seconds

Expected behavior
The multipleResolves handler should not be triggered.

System info

  • OS: macOS, docker (node:14 base)... likekly not os specific
  • RethinkDB Version: 2.4.1

Additional context
This was introduced in 2.4.6 (did not happen in 2.4.5) and is still present in 2.4.8.

I'll test and fix this in several days

@murrayju this happens due to the opened issue in node. Can you describe the case where it disturbs you? Can't call this a bug

Thanks for the quick response. I'm aware of the node issue, I was only concerned because this was a change in behavior that I didn't expect from a patch release, and might have been sign of a problem. The implementation using Promise.race totally explains it, so I'm satisfied.