You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python 3.12.8, werkzeug 3.1.3 on flask 3.1.0
(no issue with the previous setup: python 3.8, werkzeug 2.0.1 on flask 2.0.1 and the same flask app)
Conditions:
werkzeug runs with SSL certificates set up (ssl_context provided to make_server, also threaded=True)
there exists some specific network setup between werkzeug and connecting client; I haven't been able to reproduce the problem running the app locally and unfortunately I have no means to debug in the actual environment where the problem happens - I may try to check some specific things if needed
a flask route is set up to produce SSE-compatible streaming response (return Response(stream_with_context(my_data_generator(), mimetype="text/event-stream")), 200)
Error scenario:
a client successfully subscribes to the SSE stream (with GET /streaming-endpoint)
after some the client is shut down (it may have received some messages already or not)
my_data_generator() produces a new message
werkzeug always fails when attempting to send it to the now-dead client with the below:
[ERROR] (_internal.py/_log:97) Error on request:
Traceback (most recent call last):
File "D:\CondaEnvs\default\Lib\site-packages\werkzeug\serving.py", line 370, in run_wsgi
execute(self.server.app)
File "D:\CondaEnvs\default\Lib\site-packages\werkzeug\serving.py", line 334, in execute
write(data)
File "D:\CondaEnvs\default\Lib\site-packages\werkzeug\serving.py", line 306, in write
self.wfile.write(hex(len(data))[2:].encode())
File "D:\CondaEnvs\default\Lib\socketserver.py", line 840, in write
self._sock.sendall(b)
File "D:\CondaEnvs\default\Lib\ssl.py", line 1210, in sendall
v = self.send(byte_view[count:])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\CondaEnvs\default\Lib\ssl.py", line 1179, in send
return self._sslobj.write(data)
^^^^^^^^^^^^^^^^^^^^^^^^
ssl.SSLError: [SYS] unknown error (_ssl.c:2417)
Expected:
the error is ignored
The text was updated successfully, but these errors were encountered:
python 3.12.8, werkzeug 3.1.3 on flask 3.1.0
(no issue with the previous setup: python 3.8, werkzeug 2.0.1 on flask 2.0.1 and the same flask app)
Conditions:
Error scenario:
Expected:
The text was updated successfully, but these errors were encountered: