refactor the client, correctly handle max inflight per connection
add retry logic, for broken connections