libmal: Connection errors handled properly