open_keys: handle errno on disconnect

when disconnecting a device the forked reader was looping forever.