Skip to content

Commit d43983e

Browse files
committed
apply 1 minute timeout to file listing
1 parent 4b5bffb commit d43983e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.pas

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
Copyright (C) 2002-2020 Massimo Melina (www.rejetto.com)
33
44
This file is part of HFS ~ HTTP File Server.
@@ -1383,6 +1383,7 @@ TfileListing = class
13831383
constructor TfileListing.create();
13841384
begin
13851385
dir:=NIL;
1386+
timeout:=Now()+1/MINUTES;
13861387
end; // create
13871388

13881389
destructor TfileListing.destroy;
@@ -5039,7 +5040,6 @@ procedure Tmainfrm.httpEvent(event:ThttpEvent; conn:ThttpConn);
50395040
listing:=TfileListing.create();
50405041
try
50415042
listing.ignoreConnFilter:=ignoreConnFilters;
5042-
listing.timeout:= now()+1/MINUTES;
50435043
listing.fromFolder( f, data, shouldRecur(data));
50445044
fIsTemp:=f.isTemp();
50455045
ofs:=length(f.resource)-length(f.name)+1;

0 commit comments

Comments
 (0)