Skip to content

Conversation

jsumners
Copy link
Member

@jsumners jsumners commented Nov 20, 2020

Resolves issue #64

Checklist

fastify.decorate('redis', client)
if (options.closeClient === true) {
fastify.addHook('onClose', close)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we would need to support when this is false in all cases.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about that. The issue is around passing in a specific client and managing that outside instance.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, if somebody is not passing a client in and closeClient: false, then closing the client seems off.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unclear why they would do that or why it would even be supported. They wouldn't be able to manage it without first pulling the instance from Fastify.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, let's ship this anyway :)

@jsumners
Copy link
Member Author

At your leisure. I have no permissions here.

@mcollina mcollina merged commit c042182 into fastify:master Nov 20, 2020
@jsumners jsumners deleted the issue-64 branch November 20, 2020 18:33
@starnayuta starnayuta mentioned this pull request Apr 10, 2023
4 tasks
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