mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 10:47:48 +02:00
Client: NetBIOS over TCP: Apply timeout set by the client instead of hardcoded value
This commit is contained in:
parent
dd7b945ddc
commit
cf182e787f
2 changed files with 2 additions and 4 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue