Reconnect in case of "Timeout detected. (control connection)"

Advertisement

serjdag
Guest

Reconnect in case of "Timeout detected. (control connection)"

Hello,

I'm working on PS script to automate FTP task. FTP session starts every 5 min.
Few times a day I got "Timeout detected. (control connection)" message in log when trying to connect FTP server.

Is it possible to retry connection in case of such connection problem?

Thank you.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,540
Location:
Prague, Czechia

Re: Reconnect in case of "Timeout detected. (control connection)"

Yes, just retry the Session.Open, if it fails.

Reply with quote

serjdag
Guest

Re: Reconnect in case of "Timeout detected. (control connection)"

martin wrote:

Yes, just retry the Session.Open, if it fails.

Thanks Martin! I have added 'try' right before Session.Open and put it again after catch.
Worked two days without issues.

Thanks!

Reply with quote

Advertisement

You can post new topics in this forum