Test if adding a sock.close() helps with the socket hanging issue.