fix bug: when client lost connection to server, when it reconnect, will receive the recent messages.