Describe the bug redis version:5.0.5 timeout:300 pack 19:05:07, this connection starts to be idle. Theoretically, the connection should be disconnected at 19:10:07 (send FIN or RST), but the connection was actually disconnected at 19:10:25. The client thought the connection still existed at 19:10:13, so it continued to send messages. Waiting for the server's response, causing the client to be in a blocking state. sourceCode I checked the log and found that RDB is in progress at this time, and a process will be forked. Combined with the source code, I found that the close method is used to close the connection. Due to the existence of the RDB sub-process, the main process calls close method and does not close the connection. But Redis is no longer processing any data on this connection. Finally, the client does not know that the connection has been closed until the RDB ends. Expected behavior I think the shutdown method can be used instead of the close method, so that the server can immediately send RST or FIN to the client, and the client can immediately sense that the connection is disconnected.

Comment From: enjoy-binbin

this was also mentioned in #10077

Comment From: oranagra

let's close this one as a dup and try to revive the discussion in the other one.

Comment From: warriorswin

OK, thanks