[fix] wait for inner tasks before closing #70
Probably fixes #70
OK, it does not fix the problem, because https://github.com/mosquito/aiormq/blob/bedf52cee682777435c71486e1614636aedc9330/aiormq/channel.py#L80 is also in the inner tasks that are cancelled by reversing order. Maybe it is possible to separate __reader and the rest of tasks
And now I think this is not worth it... Maybe we can just ignore all messages after channel.close() with some flag
Also need to write test case for #70 :smile:
OK, it failed due to
tests/test_connection.py::test_no_free_channels[amqp-uvloop]
Task exception was never retrieved
future: <Task finished name='Task-15309'
coro=<Connection.channel() done,
defined at /drone/src/aiormq/connection.py:474>
exception=<ConnectionNotAllowed:
The client tried to work with some entity in a manner that is
prohibited by the server, due to security settings or
by some other criteria: 'NOT_ALLOWED - number of
channels opened (2047) has reached the negotiated
channel_max (2047)'> created at /usr/lib/python3.8/asyncio/tasks.py:470
>
I see @pytest.mark.no_catch_loop_exceptions there and I don't know what it is, but it passes this test in all environments on my machine.
@moznuy is it still actual? It looks like this problem has already been solved in master, albeit in a different way.