Skip to content

c.sess.Send error handling #291

@KSDaemon

Description

@KSDaemon

Right now all over the sources, we do not check and process the return error value from c.sess.Send call.

Golang linter of course is complaining about that.

  Error: Error return value of `c.sess.Send` is not checked (errcheck)
  Error: Error return value of `c.sess.Peer.Send` is not checked (errcheck)
  Error: Error return value of `c.sess.Send` is not checked (errcheck)
  Error: Error return value of `c.sess.Send` is not checked (errcheck)
  Error: Error return value of `c.sess.Send` is not checked (errcheck)
  Error: Error return value of `c.sess.Peer.Send` is not checked (errcheck)
  Error: Error return value of `c.sess.Peer.Send` is not checked (errcheck)
  Error: Error return value of `c.sess.SendCtx` is not checked (errcheck)
  Error: Error return value of `c.sess.SendCtx` is not checked (errcheck)
  Error: Error return value of `c.sess.SendCtx` is not checked (errcheck)

We need to agree on what to do:

  • Just mark such places as ignored by linter
  • Or really check for the error. But then we'll get another question: what to do if there is an error because if that is a really failure — the underlying connection will be closed and there is no need to process the error somehow

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions