Skip to content

Conversation

@sturzael
Copy link

@sturzael sturzael commented Jun 7, 2019

You aren't supposed to open and close the connection each time you make a new request.

This way, new connections can use the existing pool rather than having to wait for the previous one to be closed.

Don't repeatedly use connect() & end() as this will eventually cause issues. Just open it once and reuse it.

@sturzael
Copy link
Author

bump

@nax3t
Copy link

nax3t commented Nov 10, 2020

@sturzael I'm getting an error for connection.destroy() with your implementation: TypeError: connection.destroy is not a function

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

Successfully merging this pull request may close these issues.

2 participants