Skip to content

Commit

Permalink
apply 1 minute timeout to file listing
Browse files Browse the repository at this point in the history
  • Loading branch information
rejetto committed Jun 28, 2020
1 parent 4b5bffb commit d43983e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.pas
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
Copyright (C) 2002-2020 Massimo Melina (www.rejetto.com)
This file is part of HFS ~ HTTP File Server.
Expand Down Expand Up @@ -1383,6 +1383,7 @@ TfileListing = class
constructor TfileListing.create();
begin
dir:=NIL;
timeout:=Now()+1/MINUTES;
end; // create

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

0 comments on commit d43983e

Please sign in to comment.