While working on
FLINK-10403, I noticed that Flink's RestClient does not seem to react to a lost connections in time. When sending a request to the current leader it happened that the leader was killed just after establishing the connection. Then the RestClient did not fail the connection and was stuck in writing a request or retrieving a response from the lost leader. I'm wondering whether we should introduce a ReadTimeoutHandler and WriteTimeoutHandler to handle these problems.