-
Notifications
You must be signed in to change notification settings - Fork 9
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
Introduce forceKill logic #11
Conversation
TODO - add a section in the readme with an example and description of the behavior |
defer c.mu.Unlock() | ||
err := c.conn.Close() | ||
|
||
if err == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There can be valid reasons an error is returned. For example, if the underlying driver already closed the connection. I think here we just log the error (if any) and mark as "killed" no matter what.
defer cg.mu.Unlock() | ||
|
||
if v, ok := vs[forceKill]; ok { | ||
firstValue := v[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code works fine for the positive case. If someone mistypes the camelCase, they don't get confirmation that their "settings" were bad, however.
No description provided.