Your chain always has a chance of breaking each time you walk into shaking grass. When it breaks, the game generates a random Pokemon from the Pokemon that can normally be encountered in your grass patch. For example, if Sneasel's rarity was 25%, then you have a 25% chance of encountering another Sneasel even when your chain is breaking.
source