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

irc, memories: fix handling QUITs, and prevent infinite failed-connection retries #2306

Merged
merged 4 commits into from
Jun 12, 2022

Conversation

Exirel
Copy link
Contributor

@Exirel Exirel commented Jun 11, 2022

Description

This started with our instance of Sopel running from source with the bot becoming unresponsive after a user quit the server: there was a bug in how SopelIdentifierMemory deals with None in memory. This caused an unexpected exception at the wrong place, which put the bot in a weird unstable state from which it doesn't recover.

I also fixed the case where an SSL connection error would block the bot in an infinite restart loop.

I'm still not sure the message handling is safe, but at least this particular cause is fixed.

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
  • I have tested the functionality of the things this change touches

@Exirel Exirel added High Priority Bugfix Generally, PRs that reference (and fix) one or more issue(s) labels Jun 11, 2022
@Exirel Exirel added this to the 8.0.0 milestone Jun 11, 2022
@Exirel Exirel requested a review from dgw June 11, 2022 16:20
@Exirel Exirel marked this pull request as ready for review June 11, 2022 16:55
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.

Through the magic of git checkout master -- sopel/tools/memories.py && make test I have verified that indeed, the new test coverage does validate a fix. 🚀

.coveragerc Show resolved Hide resolved
sopel/plugins/rules.py Show resolved Hide resolved
@dgw dgw changed the title irc, memories: prevent unexpected failures when a user quit irc, memories: fix handling QUITs, and prevent infinite failed-connection retries Jun 11, 2022
@dgw dgw merged commit 05a2a76 into sopel-irc:master Jun 12, 2022
@dgw dgw mentioned this pull request Jun 12, 2022
4 tasks
@Exirel Exirel deleted the fix-quit-message-handling branch July 14, 2022 11:45
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) High Priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants