I have an application which uses TCP port 16969. It sometimes requires a quick software kernel reboot on the fly. But if I launch it too fast, I am locked with
fuser -k 16969/tcp
can free that port. This is a useful command that can be used to close ports, whichever it is.