Fixed unclosed sockets that python complains about. Even though there's no actual issue.