TOR Client, KeepAlive params, catch SocketException 10042
MODIFY
WalletWasabi/Tor/Socks5/TorTcpConnectionFactory.cs
WalletWasabi/Tor/Socks5/TorTcpConnectionFactory.cs
@@ -77,9 +77,9 @@ public class TorTcpConnectionFactory
tcpClient.Client.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.TcpKeepAliveInterval, 5);
tcpClient.Client.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.TcpKeepAliveRetryCount, 5);
}
- catch (SocketException e)
+ catch (SocketException ex) when (ex.ErrorCode is 10042)
{
- Logger.LogError("Exception occurred when setting keepAlive params.", e);
+ Logger.LogWarning("KeepAlive settings are not allowed by your OS. Ignoring.");
}
transportStream = await ConnectAsync(tcpClient, cancellationToken).ConfigureAwait(false);

TOR Client, KeepAlive params, catch SocketException 10042