Stop polling before closing port.