Conversation
net.Error.Temporary has been deprecated since Go 1.18. There has been some discussion around what to use in server accept loops instead [1], but the suggestion seems to be that it may be a mistake to have any sort of retries in place [2]. This PR removes it, which may expose some users to errors that were previously swallowed and retried, but at the expense of leaking file descriptors and the like. 1: https://groups.google.com/g/golang-nuts/c/-JcZzOkyqYI/m/xwaZzjCgAwAJ?pli=1 2: https://groups.google.com/g/golang-nuts/c/-JcZzOkyqYI/m/vNNiVn_LAwAJ
|
I think this change unfortunately interacts badly with the default read timeout used in UDP servers (not TCP servers, in my testing). The default read timeout is 2 seconds, and it seems that any UDP server started via Is timing out UDP reads repeatedly while serving intentional? Digging around in the history, it seems the Maybe we want to revert this until we have a better understanding of the impact, because on |
|
let's revert then. Would be nice if some kind of unit test would have caught this though |
This reverts commit ef7392e. See: #1589 (comment) breaks udp serving
This reverts commit ef7392e. See: #1589 (comment) breaks udp serving
net.Error.Temporary has been deprecated since Go 1.18. There has been some discussion around what to use in server accept loops instead [1], but the suggestion seems to be that it may be a mistake to have any sort of retries in place [2].
This PR removes it, which may expose some users to errors that were previously swallowed and retried, but at the expense of leaking file descriptors and the like.
1: https://groups.google.com/g/golang-nuts/c/-JcZzOkyqYI/m/xwaZzjCgAwAJ?pli=1
2: https://groups.google.com/g/golang-nuts/c/-JcZzOkyqYI/m/vNNiVn_LAwAJ
Thanks for you pull request, do note the following:
If your PR introduces backward incompatible changes it will very likely not be merged.
We support the last two major Go versions, if your PR uses features from a too new Go version, it
will not be merged.