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

Fix Tor exception handling on non-English Linux #795

Closed
nopara73 opened this Issue Nov 2, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@nopara73
Collaborator

nopara73 commented Nov 2, 2018

We had this issue on non-English Windows, which we fixed, but I think non-English Tor also ruins it, since I got an error report about it.

try
				{
					await TcpClient.ConnectAsync(TorSocks5EndPoint.Address, TorSocks5EndPoint.Port);
				}
				// ex.Message must be checked, because I'm having difficulty catching SocketExceptionFactory+ExtendedSocketException
				catch (Exception ex) when (ex.Message.StartsWith(
											   "No connection could be made because the target machine actively refused it")
										   || ex.Message.StartsWith("Connection refused"))
				{
					error = ex;
				}
				catch (SocketException ex) when (ex.ErrorCode == 10061)
				{
					error = ex;
				}
				if (error != null)
					throw new ConnectionException(
						$"Couldn't connect to Tor SOCKSPort at {TorSocks5EndPoint.Address}:{TorSocks5EndPoint.Port}. Is Tor running?", error);

I think catch (SocketException ex) when (ex.ErrorCode == 10061) doesn't catch the error on non-English Linux.

@nopara73 nopara73 added the debug label Nov 2, 2018

@nopara73

This comment has been minimized.

Collaborator

nopara73 commented Nov 2, 2018

Turns out Wasabi didn't work on non-English Linux and OSX at all. These fixing it:

da9ce34
8bbcee6

@nopara73 nopara73 closed this Nov 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment