Closed connections are not refreshed in client.py _send
Open
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 269
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 6
Description
**Describe the bug**
[_get_conn](https://github.com/aio-libs/aiokafka/blob/master/aiokafka/client.py#L424) refreshes closed connections but [_send](https://github.com/aio-libs/aiokafka/blob/master/aiokafka/client.py#L515) doesn't use `_get_conn` so it will try to send data over a connections that got closed e.g. due to being idle for too long.
This results in
```
Error sending OffsetCommitRequest_v2 to node 11 [KafkaConnectionError: Connection at ... closed] -- marking coordinator dead
```
for our use case.
**Expected behaviour**
`_send` should refresh closed connections
**Environment**
- aiokafka version 0.12.0
Contributor guide
Assessment
This issue has not been assessed yet.