-
Notifications
You must be signed in to change notification settings - Fork 74
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
Why to copy ConnectionFactory on each create #73
Comments
Hi @jhalterman do you know why the lib always copy? hence when we use new version of the factory it may have new properties and if we forget to copy this it may be problem.... |
@igreenfield The thinking was that options are things that help you create a Connection, which cannot be changed once the connection is made, and Config are things that can be changed after the Connection is made. A new version of a connection factory should require a new connection, right? |
@jhalterman New Connection yes, but hear you create connection from options the user pass to you... so why you copy it first? |
@igreenfield The thinking was I didn't want changes to the What sort of use case do you have where this is a problem? |
@jhalterman The 'ConnectionOptions' object expose the factory so as user I can change it and I will expect that my changes will take effect but with the copy it won't happen... |
@igreenfield That's true. You would prefer |
@jhalterman If I use the |
I see in class Connections
lines 108 - 118:
Why on line 113 you copy the options? or inside this class copy the ConnectionFactory and not reuse it?
The text was updated successfully, but these errors were encountered: