Skip to content
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

core: fix broken interrupt handling (6.6.x) #1534

Merged

Conversation

HumorBaby
Copy link
Contributor

#1527, but for 6.6.x branch

Adds a check to the `bot.quit` method to ensure that a socket exists
before writing the `QUIT` message. This prevents the unhandled
`AttributeError` that prevents a clean quit when the connection phase is
interrupted
Because the `time.sleep` during the disconnect phase, the signal
handling is thrown off and a new bot is spawned before the `bot.hasquit`
flag can be checked. Add a check at the top of the loop to see if the
`hasquit` flag was set during a disconnect.

Fixes sopel-irc#1478
@dgw dgw added the Bugfix Generally, PRs that reference (and fix) one or more issue(s) label Apr 1, 2019
@dgw dgw added this to the 6.6.6 milestone Apr 1, 2019
@HumorBaby HumorBaby changed the title 1478 fix broken interrupt handling 6.6.x core: fix broken interrupt handling (6.6.x) Apr 1, 2019
@dgw
Copy link
Member

dgw commented Apr 1, 2019

Uh, Travis, could you wake up and report the PR status please? 😦

Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

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

Travis eventually did wake up, but more importantly I had a chance to test this.

It seems to fix all the broken cases I found. I'll discuss what it doesn't fix (or more accurately, what other problems were revealed hiding behind what this fixed) in #1527 and/or #1478—stuff that we should fix in 7.x, but that I won't worry about for 6.x any more.

@dgw dgw merged commit a8579a5 into sopel-irc:6.6.x Apr 9, 2019
@HumorBaby HumorBaby deleted the 1478-fix-broken-interrupt-handling-6.6.x branch April 9, 2019 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Generally, PRs that reference (and fix) one or more issue(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants