Topic "SessionOptions parametter TimeoutInMilliseconds didn't work"

Author Message
Alekos

Guest


Hi,I'm working with VisualStudio 2017 in C# and when I try to set a timeout like that:
Code:
SessionOptions sessionOpt = new SessionOptions
{
  Protocol = Protocol.Scp,
  [...]
  TimeoutInMilliseconds = 120000, //2min
  [...]
};
mysession.Open(sessionOpt);


The session's timeout still 60000 (default value)

but when I use :
Code:
mysession.Timeout = new TimeSpan(0,2,0); //2min


It works perfectly (session's timeout = 120000) Smile

Maybe you have a bug there Wink
Advertisements
Alekos

Guest


Maybe I didn't get the difference between TimeoutInMilliseconds and session.Timeout Question
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26150
Location: Prague, Czechia
SessionOptions.Timeout[InMilliseconds] is session timeout (as in WinSCP GUI session options).

Session.Timeout is timeout for communication between the assembly and the winscp.exe.
Alekos

Guest


Ty for the reply.
The names of these parameters are a bit confusing.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License