Report question

Question: How do I close a port in a case of program termination?