diff --git a/SMBLibrary/Client/SMB1Client.cs b/SMBLibrary/Client/SMB1Client.cs index 72c3108..d083f89 100644 --- a/SMBLibrary/Client/SMB1Client.cs +++ b/SMBLibrary/Client/SMB1Client.cs @@ -585,10 +585,9 @@ namespace SMBLibrary.Client internal SessionPacket WaitForSessionResponsePacket() { - const int TimeOut = 5000; Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); - while (stopwatch.ElapsedMilliseconds < TimeOut) + while (stopwatch.ElapsedMilliseconds < m_responseTimeoutInMilliseconds) { if (m_sessionResponsePacket != null) { diff --git a/SMBLibrary/Client/SMB2Client.cs b/SMBLibrary/Client/SMB2Client.cs index 4486e9a..827a705 100644 --- a/SMBLibrary/Client/SMB2Client.cs +++ b/SMBLibrary/Client/SMB2Client.cs @@ -555,10 +555,9 @@ namespace SMBLibrary.Client internal SessionPacket WaitForSessionResponsePacket() { - const int TimeOut = 5000; Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); - while (stopwatch.ElapsedMilliseconds < TimeOut) + while (stopwatch.ElapsedMilliseconds < m_responseTimeoutInMilliseconds) { if (m_sessionResponsePacket != null) {