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

do not create sender at close #208

Merged
merged 2 commits into from
Jun 6, 2024
Merged

Conversation

methane
Copy link
Member

@methane methane commented Jun 5, 2024

No description provided.

@jgoclawski
Copy link

This makes perfect sense, not only fixes problem reported in #207, but also removes redundant code.
I suppose it could be even simpler?

def close(self):
    self.acquire()
    try:
        try:
            if self._sender is not None:
                self._sender.close()
                self._sender = None
        finally:
            super(FluentHandler, self).close()
    finally:
        self.release()

Anyway, LGTM 👍

@methane methane merged commit ef7be65 into fluent:master Jun 6, 2024
11 checks passed
@methane methane deleted the fix-shutdown branch June 6, 2024 15:12
@methane
Copy link
Member Author

methane commented Jun 6, 2024

            super(FluentHandler, self).close()

FWIW, it is Python 2 code. We can write super().close() as we have dropped Python 2 support.

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