on localhost my program is working fine, but as soon as i try to host it on a server I get this error like 30s to 1m after my client connects
no idea why this could be happening
Traceback (most recent call last):
File "/var/mobile/.local/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 959, in transfer_data
message = await self.read_message()
File "/var/mobile/.local/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 1029, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
File "/var/mobile/.local/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 1104, in read_data_frame
frame = await self.read_frame(max_size)
File "/var/mobile/.local/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 1165, in read_frame
extensions=self.extensions,
File "/var/mobile/.local/lib/python3.7/site-packages/websockets/legacy/framing.py", line 68, in read
data = await reader(2)
File "/usr/lib/python3.7/asyncio/streams.py", line 677, in readexactly
raise IncompleteReadError(incomplete, n)
asyncio.streams.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 "main.py", line 74, in
asyncio.run(handle_connection(uri))
File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "main.py", line 58, in handle_connection
message = await websocket.recv()
File "/var/mobile/.local/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 568, in recv
await self.ensure_open()
File "/var/mobile/.local/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 935, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: no close frame received or sent
on localhost my program is working fine, but as soon as i try to host it on a server I get this error like 30s to 1m after my client connects no idea why this could be happening
= connection is CONNECTING
Traceback (most recent call last): File "/var/mobile/.local/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 959, in transfer_data message = await self.read_message() File "/var/mobile/.local/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 1029, in read_message frame = await self.read_data_frame(max_size=self.max_size) File "/var/mobile/.local/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 1104, in read_data_frame frame = await self.read_frame(max_size) File "/var/mobile/.local/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 1165, in read_frame extensions=self.extensions, File "/var/mobile/.local/lib/python3.7/site-packages/websockets/legacy/framing.py", line 68, in read data = await reader(2) File "/usr/lib/python3.7/asyncio/streams.py", line 677, in readexactly raise IncompleteReadError(incomplete, n) asyncio.streams.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 "main.py", line 74, in
asyncio.run(handle_connection(uri))
File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "main.py", line 58, in handle_connection
message = await websocket.recv()
File "/var/mobile/.local/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 568, in recv
await self.ensure_open()
File "/var/mobile/.local/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 935, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: no close frame received or sent