Disconnect and close ports on stop