This caused problems in java client.
When heartbeat interval value is lower than connection timeout, it could be the case that hearbeat closes connection before it gets first answer from user. As a solution we initialized last_read_time to current time when connection first constructed.