I would always replace pan connector.
But if for some reason that was a problem (eg, old WC pan is concreted onto floor or a floor layer is fitted over edges of pan where it meets floor), then plumbers putty can work very well - it's flexible and can be squeezed in quantity into the gap between the outside of the pan and the inside of the connector. Bit of a pig to get the putty off hands, though.