Added a sock.close call to test_stream