Keep track of the valid ports and don't emit port info for invalid ports. When a listener is added while the ports are being created, it is possible that the ports are still NULL or invalid.