test: add a missing close() for socket

This suppresses a ResourceWarning in Python 3.5alpha