No cleanup on rpc timeout
- Lenguaje dominante
- Python
- Estrellas
- 431
- Forks
- 57
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
``` python
import itertools
import asyncio
import contextlib
import aiozmq.rpc
async def foo():
client = await aiozmq.rpc.connect_rpc(connect="tcp://127.0.0.1:5555",
timeout=0)
for i in itertools.count():
if i % 1000 == 0:
print(len(client._proto.calls))
with contextlib.suppress(asyncio.TimeoutError):
await client.call.test()
loop = asyncio.get_event_loop()
loop.run_until_complete(foo())
```
Output:
``` shell
$ python test.py
0
1000
2000
3000
4000
5000
6000
...
```
There is no cleanup on timeout event. Timeout just fires, but no changes to internals.
https://github.com/aio-libs/aiozmq/blob/master/aiozmq/rpc/rpc.py#L182
https://github.com/aio-libs/aiozmq/blob/master/aiozmq/rpc/util.py#L23-L28
This code on my desktop increase python process memory usage at 10Mb/s rate.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.