That if-clause seems to do more than what you've written in the comment. Mind explaining it in a little more words to me? Why the limit to just the default port for example?