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
(similar to #314). GETting some resource through a proxy works fine, and it also works fine if the WebSocket connection is shut down cleanly (as it happens with aiocoap-widgets when Ctrl-C is pressed or the window is closed). However, when the process is kill -9'd, which terminates the TCP connection without going through the CoAP shutdown dance, we get this error situation:
The RD logs the following debug output:
ERROR:coap-server:Sending to a WebSocket should not raise errors
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/websockets/legacy/protocol.py", line 968, in transfer_data
message = await self.read_message()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/websockets/legacy/protocol.py", line 1038, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/websockets/legacy/protocol.py", line 1113, in read_data_frame
frame = await self.read_frame(max_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/websockets/legacy/protocol.py", line 1170, in read_frame
frame = await Frame.read(
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/websockets/legacy/framing.py", line 69, in read
data = await reader(2)
^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/streams.py", line 727, in readexactly
raise exceptions.IncompleteReadError(incomplete, n)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 2 expected bytes
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/chrysn/git/aiocoap/aiocoap/transports/ws.py", line 174, in send
await self._connection.send(_serialize(msg))
File "/usr/lib/python3/dist-packages/websockets/legacy/protocol.py", line 635, in send
await self.ensure_open()
File "/usr/lib/python3/dist-packages/websockets/legacy/protocol.py", line 944, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: no close frame received or sent
The client sending the GET blocks indefinitely -- it gets an empty ACK but never a response. This is also true for subsequent GETs up to some timeout.
The proper behavior would be to err as in all clean shutdown situations; at most, there should be an info or warning message in the RD's log.
The text was updated successfully, but these errors were encountered:
Start at this setup:
(similar to #314). GETting some resource through a proxy works fine, and it also works fine if the WebSocket connection is shut down cleanly (as it happens with aiocoap-widgets when Ctrl-C is pressed or the window is closed). However, when the process is
kill -9
'd, which terminates the TCP connection without going through the CoAP shutdown dance, we get this error situation:The proper behavior would be to err as in all clean shutdown situations; at most, there should be an info or warning message in the RD's log.
The text was updated successfully, but these errors were encountered: