-
Notifications
You must be signed in to change notification settings - Fork 64
Conversation
@johanneswuerbach Tests are failing... |
512f908
to
7b2d29d
Compare
Added a fix for the second race. |
7b2d29d
to
b263cad
Compare
Can you explain the second one a little more? I’ve copied the simpler first one into a pull request at #111 in case it can go in earlier. |
@charmander the issue occurs when you use
My fix now creates a |
} | ||
if (!this._isFull()) { | ||
return this.connect(waiter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found re-entering into "full" connect
here a bit confusing as we already know that we need to create a new client and can never add the waiter to the pending queue again as far as I can see.
Now this makes it more clear by using the newClient
method directly here and in connect
, wdyt?
Thanks for the explanation! |
When will we see this merged? |
@brianc any chance you could have a look? Happy to rebase, but I would prefer a general 👍 / 👎 first. |
I think this looks good! Thanks for the explanation and PR! If you rebase I'll npm-link it into |
b263cad
to
20aa6ab
Compare
@brianc done 👍 |
Let me also know, if you think #110 is worth-while proceeding :-) |
K - tested this w/ node-postgres. All is in order. Will release a new patch version shortly. Thanks again! |
@brianc Christmas-shortly by any chance? 😄 Throw it under the Christmas tree, will ya? 😄 |
Ah crap i totally forgot to release this after i tested. Will do! Sorry! |
When will it be? :) |
bump for great justice. Really appreciate all the hard work on the library -- this one's definitely impacting us in production. New tagged release would be 💯 Thank you! |
yeah...sorry again. Was out of town. release |
Fix two races
can occur after any connection failure as another
_pulseQueue
is never started and pending items added during the connect won't be processedoccurs when a formerly queued client is processed and finds a free pool slot (e.g. because a previous client errored), but during client.connect times out itself.