app.templates_auto_reload = True
or app.config["TEMPLATES_AUTO_RELOAD"] = True
async with test_client.request(...) as connection:
connection.send(b"data")
await trio.sleep(A_LONG_TIME)
assert connection.as_response().status_code == 408
Hi @pgjones -- I've been dealing with a very weird issue with the SSE application I mentioned earlier. The whole code is here: https://github.com/esfoobar/quart-feed. But what's happening is that once I get into the SSE page (the home page) and I reload several times manually, I eventually get to this error:
ages/aiomysql/cursors.py", line 457, in _query
quartfeed_web_1 | await conn.query(q)
quartfeed_web_1 | File "/root/.local/share/virtualenvs/quartfeed_app-1k77iZGH/lib/python3.8/site-packages/aiomysql/connection.py", line 428, in query
quartfeed_web_1 | await self._read_query_result(unbuffered=unbuffered)
quartfeed_web_1 | File "/root/.local/share/virtualenvs/quartfeed_app-1k77iZGH/lib/python3.8/site-packages/aiomysql/connection.py", line 622, in _read_query_result
quartfeed_web_1 | await result.read()
quartfeed_web_1 | File "/root/.local/share/virtualenvs/quartfeed_app-1k77iZGH/lib/python3.8/site-packages/aiomysql/connection.py", line 1105, in read
quartfeed_web_1 | first_packet = await self.connection._read_packet()
quartfeed_web_1 | File "/root/.local/share/virtualenvs/quartfeed_app-1k77iZGH/lib/python3.8/site-packages/aiomysql/connection.py", line 561, in _read_packet
quartfeed_web_1 | packet_header = await self._read_bytes(4)
quartfeed_web_1 | File "/root/.local/share/virtualenvs/quartfeed_app-1k77iZGH/lib/python3.8/site-packages/aiomysql/connection.py", line 598, in _read_bytes
quartfeed_web_1 | data = await self._reader.readexactly(num_bytes)
quartfeed_web_1 | File "/usr/local/lib/python3.8/asyncio/streams.py", line 723, in readexactly
quartfeed_web_1 | await self._wait_for_data('readexactly')
quartfeed_web_1 | File "/usr/local/lib/python3.8/asyncio/streams.py", line 503, in _wait_for_data
quartfeed_web_1 | raise RuntimeError(
quartfeed_web_1 | RuntimeError: readexactly() called while another coroutine is already waiting for incoming data
Any ideas why this is happening?