Autor Beitrag
AScomp
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 162


Delphi 5, Delphi 7, Delphi 2007, Delphi 2009, Delphi XE, Delphi 10 Seattle
BeitragVerfasst: Fr 14.09.07 04:03 
Hallo zusammen,

habe folgendes Problem: mit IdFTP.Put werden in meiner Anwendung Dateien hochgeladen. Manchmal kommt es aber zu einem Verbindungsabbruch (z.B. wenn die Internetverbindung oder die Verbindung zum Router gekappt wurde), doch IdFTP erkennt dies nicht. Liegt wohl daran, dass es in der aktuellen Indy-Version kein WriteTimeout für IdFTP gibt.

Doch irgendwie muss das Problem ja lösbar sein. Derzeit friert die Anwendung in solchen Fällen immer ein - irgendwelche Ideen?

P.S. try...except bewirkt in diesem Fall gar nichts, da Put einfach ewig auf eine Response vom Server wartet, die natürlich nie kommt.

Viele Grüße,

Andy
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 14.09.07 09:36 
Welche Indy Version verwendest du denn?

_________________
In the beginning was the word.
And the word was content-type: text/plain.
AScomp Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 162


Delphi 5, Delphi 7, Delphi 2007, Delphi 2009, Delphi XE, Delphi 10 Seattle
BeitragVerfasst: Fr 14.09.07 14:44 
Hallo Matthias,

ist die 10.1.5 auf Delphi 2007.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 15.09.07 08:43 
hast du auch die TimeOut Eigenschatten richtig gesetzt?
Vielleicht wartet Indy deswegen so lang, weil es so konfiguriert ist.

Hinweis: Soweit ich weiß, gibt es zwei Timeout Eigenschaften.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
AScomp Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 162


Delphi 5, Delphi 7, Delphi 2007, Delphi 2009, Delphi XE, Delphi 10 Seattle
BeitragVerfasst: Sa 15.09.07 16:34 
Hallo,

an den Timeout-Properties liegt es wie gesagt nicht. Das Problem ist ja, dass es eben KEINE WriteTimeout-Eigenschaft gibt.

Habe inzwischen aber ein Workaround gefunden, im OnWorkEnd kann man überprüfen, ob die komplette Anzahl an Bytes übertragen wurde. Wenn nicht, hat ein Abbruch stattgefunden.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 15.09.07 21:26 
Das ist da fein. Vielleicht postest du das Problem auch mal in der Indy Mailingliste, damit, wenn wirklich keine einfach Lösung gibt, die Entwickler informiert sind.

_________________
In the beginning was the word.
And the word was content-type: text/plain.