winsane: Detect connection loss and return I/O error status code