Did it look like this?
Or like "D" here?
If so, that isn't corrosion, it's carbon buildup.
A: New 02 sensor
B: Oil Fouled 02 sensor
D: Carbon Fouled O2 sensor
E: Normal wear O2 sensor
The cause of carbon fouling is a rich condition, or oil consumption. Both will kill cats too!