Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

command handler doesn't output the read and write errors #9

@nak3

Description

@nak3

Current codes check the result of Read or Write like this:

  n, err := r.ReadAt(cmd.Buf[:length], int64(offset))
	if n < length {
		log.Errorln("read/read failed: unable to copy enough")
		return cmd.MediumError(), nil
	}
	if err != nil {
		log.Errorln("read/read failed: error:", err)
		return cmd.MediumError(), nil
	}

When Read() and Write() return error, they always make n < length true, and so they return before outputting the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions