Fix TCP client reconnect bug.