Updated with a socket.close()