Skip to content
Commit 50b39b74 authored by David Fifield's avatar David Fifield
Browse files

Don't report errors that are not caused by Accept in AcceptSocks.

This means that anything that is not a net.Error, or is a net.Error but
is not Temporary, should be considered to be a permanent error by the
caller. Sample code now shows the new error-checking convention.
Previously, we used the convention that a non-net.Error should be
considered temporary, because it could have been caused by a failed
SOCKS negotiation, for example. Now those errors are simply not returned
to the caller. See https://trac.torproject.org/projects/tor/ticket/14135.

In summary, previous behavior is this:
	net.Error, Temporary:     caller should try again
	net.Error, non-Temporary: caller should quit
	other errors:             caller should try again
It is now this:
	net.Error, Temporary:     caller should try again
	net.Error, non-Temporary: caller should quit
	other errors:             caller should quit
But now the "other errors" such as those caused by a bad SOCKS
negotiation will not be reported by AcceptSocks.

The practical effect of this change is almost nil; even if callers don't
update their error-checking code, the only change is in the "other
errors" that don't arise in normal use.
parent d433318f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment