Skip to content

Close connection during garbage collection - #684

Merged
sodabrew merged 3 commits into
brianmario:masterfrom
cbandy:close-during-gc
Feb 16, 2016
Merged

sodabrew merged 3 commits into
brianmario:masterfrom
cbandy:close-during-gc

Conversation

@cbandy

@cbandy cbandy commented Sep 25, 2015

Copy link
Copy Markdown
Contributor

Restores the behavior of v0.3.15 which sends QUIT during garbage collection. Keep the behavior in #463 behind a new connection option, automatic_close.

Relates to #606.

Comment thread lib/mysql2/client.rb Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Add :automatic_close to the list of booleans.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will do. automatic_close= already does the conversion using RTEST.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment thread ext/mysql2/client.c Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would avoid re-using the variable value, since we're not modifying the argument and shouldn't give the impression that we might be trying to do that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since the return value from assignment is usually ignored, I'll change this to return the unmodified input value.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@sodabrew sodabrew added this to the 0.4.3 milestone Jan 21, 2016
@sodabrew

Copy link
Copy Markdown
Collaborator

Thanks for your patience on this! I'm collecting the todo list for 0.4.3 and I'm keen to include this PR!

@cbandy

cbandy commented Jan 23, 2016

Copy link
Copy Markdown
Contributor Author

The testing of $stderr works in Linux, but I don't have a Windows machine or build server to try it on. Do you?

@sodabrew

sodabrew commented Jan 23, 2016 via email

Copy link
Copy Markdown
Collaborator

sodabrew added a commit that referenced this pull request Feb 16, 2016
Close connection during garbage collection
@sodabrew
sodabrew merged commit 924d934 into brianmario:master Feb 16, 2016
@cbandy
cbandy deleted the close-during-gc branch October 28, 2016 17:52
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