Graceful connection close without sending a `QUIT` command first
Motivation
The redis documentation mentions in the QUIT command:
Note: Clients should not use this command. Instead, clients should simply close the connection when they're not used anymore. Terminating a connection on the client side is preferable, as it eliminates TIME_WAIT lingering sockets on the server side.
https://redis.io/commands/quit/
Changes
- Do not send the QUIT command before closing anymore
- Introduce a
draining
state inRedisCommandHandler
- If the
RedisCommandHandler
is in statedraining
new request are failed immediately - Once all running requests are finished, the channel is closed
- If the