Open misovan opened 11 months ago
I used a "dirty" workaround for this, accessing the _conn
property of the SimplePool instance directly. It works, but maybe we should add a getter for Connection state. I'll open a PR
I think using the dirty workaround should be fine.
I think using the dirty workaround should be fine.
I disagree. _conn is a private field that will not even be shown by the LSP. Also accessing it directly is unsafe. A overwrite will render the pool instance useless. Also _conn holds many other private fields of the Relay Instance that are not of interest to the end user of the API.
I am working on a PR that adds a getter method to the class that will return a safe copy of only the connection state and exclude the other methods.
Is there a way to get status (readyState) of connections inside a SimplePool? Thanks