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

[Bug]: closable stream not closing #26

Open
1 task done
dwatrous opened this issue Nov 9, 2023 · 0 comments
Open
1 task done

[Bug]: closable stream not closing #26

dwatrous opened this issue Nov 9, 2023 · 0 comments
Labels
bug Something isn't working triage

Comments

@dwatrous
Copy link

dwatrous commented Nov 9, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Environment

-   OS: Windows/Linux
-   Python: 3

What happened?

Using the realtime database module with a stream, I frequently get an error when trying to close the connection

Code Snippet

This happens anytime close() is call
`my_stream.close()`

Relevant log output

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/firebase/database/_stream.py", line 63, in close
    self.sse.close()
  File "/usr/local/lib/python3.9/dist-packages/firebase/database/_closable_sse_client.py", line 29, in close
    self.resp.raw._fp.fp.raw._sock.shutdown(socket.SHUT_RDWR)
AttributeError: 'NoneType' object has no attribute 'raw'


### Anything else?

Right now I catch the exception and log it, then move on. Much of the time this works, but sometimes the entire app hangs while the thread is waiting on this and I have to kill the script and start it again.
@dwatrous dwatrous added bug Something isn't working triage labels Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant