Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup remnants of net.Error Temporary() #847

Closed
wants to merge 1 commit into from
Closed

Cleanup remnants of net.Error Temporary() #847

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Aug 29, 2023

A previous change to the package removed calls to the deprecated net.Error Temporary() method. This change removes the cruft left behind by that change.

  • Delete the hideTempError function. Because applications should not call net.Error Temporary() method, there's no need to force the Temporary() return value to false. 

  • Replace the internal errWriteTimeout error with the standard os.ErrDeadlineExceeded.

  • Prior to the removing the calls to Temporary(), the default ping and close handlers ignored timeout errors by checking for net.Error Temporary() == true. The current code does not ignore timeout errors. Restore the code to ignore timeout errors by checking for os.ErrDeadlineExceeded.

Unrelated to the above: Reduce noise in the test output by ignoring the error from the compress/flate reader Close method.

A previous change to the package removed calls to the deprecated
net.Error Temporary() method. This change removes the cruft left behind
by that change.

- Delete the hideTempError function. Because applications should not
  call net.Error Temporary() method, there's no need to force the
  Temporary() return value to false. 

- Replace the internal errWriteTimeout error with the standard
  os.ErrDeadlineExceeded.

- Prior to the removing the calls to Temporary(), the default ping and
  close handlers ignored timeout errors by checking for net.Error
  Temporary() == true. The current code does not ignore timeout errors.
  Update the handlers to ignore timeout errors by checking for
  os.ErrDeadlineExceeded.

Unrelated to the above: Reduce noise in the test output by ignoring the
error from the compress/flate reader Close method.
Repository owner closed this by deleting the head repository Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

1 participant