Skip to content

Commit 8e7570f

Browse files
committed
Removed unused parameters
1 parent a76dc1d commit 8e7570f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/MongoDB.Driver/Core/Connections/Socks5Helper.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,6 @@ internal static class Socks5Helper
8787

8888
private const int BufferSize = 512;
8989

90-
//TODO Maybe need to change the name of the ReadMethods... It's more like interpret
91-
//Need to specify all create request methods return the bytes of the message
92-
9390
public static void PerformSocks5Handshake(Stream stream, EndPoint endPoint, Socks5AuthenticationSettings authenticationSettings, CancellationToken cancellationToken)
9491
{
9592
var (targetHost, targetPort) = endPoint.GetHostAndPort();
@@ -102,7 +99,7 @@ public static void PerformSocks5Handshake(Stream stream, EndPoint endPoint, Sock
10299
stream.Write(buffer, 0, greetingRequestLength);
103100

104101
stream.ReadBytes(buffer, 0, 2, cancellationToken);
105-
var acceptsUsernamePasswordAuth = ProcessGreetingResponse(buffer, useAuth, authenticationSettings, cancellationToken);
102+
var acceptsUsernamePasswordAuth = ProcessGreetingResponse(buffer, useAuth);
106103

107104
if (useAuth && acceptsUsernamePasswordAuth)
108105
{
@@ -137,7 +134,7 @@ public static async Task PerformSocks5HandshakeAsync(Stream stream, EndPoint end
137134
var greetingRequestLength = CreateGreetingRequest(buffer, useAuth);
138135
await stream.WriteAsync(buffer, 0, greetingRequestLength, cancellationToken).ConfigureAwait(false);
139136

140-
var acceptsUsernamePasswordAuth = ProcessGreetingResponse(buffer, useAuth, authenticationSettings, cancellationToken);
137+
var acceptsUsernamePasswordAuth = ProcessGreetingResponse(buffer, useAuth);
141138

142139
if (useAuth && acceptsUsernamePasswordAuth)
143140
{
@@ -178,7 +175,7 @@ private static int CreateGreetingRequest(byte[] buffer, bool useAuth)
178175
return 4;
179176
}
180177

181-
private static bool ProcessGreetingResponse(byte[] buffer, bool useAuth, Socks5AuthenticationSettings authenticationSettings, CancellationToken cancellationToken)
178+
private static bool ProcessGreetingResponse(byte[] buffer, bool useAuth)
182179
{
183180
VerifyProtocolVersion(buffer[0]);
184181
var method = buffer[1];

0 commit comments

Comments
 (0)