Skip to content

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
@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