Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

kgala2
Copy link
Collaborator

@kgala2 kgala2 commented Apr 7, 2025

Draft-PR to check if the connector's been closed before trying to connect using the same engine.

  1. Throws error if the connector has been closed
  2. Continues to connect otherwise

self._loop.call_soon_threadsafe(self._loop.stop)
# wait for thread to finish closing (i.e. loop to stop)
self._thread.join()
self._closed = True
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is not necessary as synchronous close calls close_async so should get closed by close_async

@kgala2 kgala2 force-pushed the error-on-closed-connection branch from 2629802 to b8bc912 Compare May 16, 2025 23:11
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