port could be nil, but it's not being handled before trying to use it.

On the other hand, doing so many things in just one line makes debug hard.