The Socket field remote is explicitly allowed to be absent, but the code to handle it unconditionally passes it to prettyAddress, which panics if the value is nil. It would also be good to handle the field local similarly, because output that shows that it is nil (incorrectly) would be more useful than a panic.