Did your relationship survive sex addiction?

Last week, my partner let me know that he has a porn addiction. I’m glad he told me before me finding out, but after 4 years together it is a shock. Did anyone experience something similar? How did you (or did you not) get through it?