If we don't get one of the commands we're waiting for, close the socket and exit instead of returning with the appearance of having received one.