[backport] there is a window of client connection is established but nothing is rea...

...d, in this case if heartbeat kicks in and it can remove the connection even though heartbeat timeout is not reached. fixes #3715, #3697, #3696, #3525