reconnect logic for tcp, restarts with old counter