Apart from disconnecting the TCP connection with four waves, is there any other way to disconnect it?
If the host needs to close the connection as soon as possible (or the connection times out, or the port or host is unreachable), send RST packets (RST means reset) to force the TCP connection to be closed.
When sending a RST packet to close the connection, you can discard the packet in the cache and send the RST packet directly, and after receiving the RST packet, the receiver does not have to send the ACK packet to confirm.