You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
May (not necessarily) result in the error below Connection lost - Cannot call write after a stream was destroyed
The pool.release methods calls the connection.reset method. This methods executes SQL queries to reset to the initial state of the connection. pool.release does not use promises, so pool.drain in the above example is immediately called afterwards. pool.drain closes the connections. If one of these connections still have a request connection pending (or any other request!) it results in the above mentioned error.
I will provide a PR containing a fix soon.
The text was updated successfully, but these errors were encountered:
@nul The PR was an example fix for this problem, it's up to the maintainer of this repo if our example should be used to fix this. (But the example I provided does work, so I suggest to fork this repo and apply the fix yourself using the PR since this repository is not actively maintained anymore)
Using
May (not necessarily) result in the error below
Connection lost - Cannot call write after a stream was destroyed
The
pool.release
methods calls theconnection.reset
method. This methods executes SQL queries to reset to the initial state of the connection.pool.release
does not use promises, sopool.drain
in the above example is immediately called afterwards.pool.drain
closes the connections. If one of these connections still have a request connection pending (or any other request!) it results in the above mentioned error.I will provide a PR containing a fix soon.
The text was updated successfully, but these errors were encountered: