Fix the test_socketopen bug (issue 4)