Skip to content

Commit

Permalink
KeepConnectionAlive default is true
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciussanchez committed May 4, 2023
1 parent c73c237 commit 30c0e2e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
2 changes: 0 additions & 2 deletions samples/delphi/console/Console.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ uses
System.SysUtils;

begin
THorse.KeepConnectionAlive := True;

{$IFDEF MSWINDOWS}
IsConsole := False;
ReportMemoryLeaksOnShutdown := True;
Expand Down
2 changes: 1 addition & 1 deletion src/Horse.Provider.Abstract.pas
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
unit Horse.Provider.Abstract;

{$IF DEFINED(FPC)}
{$MODE DELPHI}{$H+}
{$MODE DELPHI}{$H+}
{$ENDIF}

interface
Expand Down
3 changes: 3 additions & 0 deletions src/Horse.Provider.Console.pas
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ class procedure THorseProvider.SetPort(const AValue: Integer);
if FEvent <> nil then
FreeAndNil(FEvent);
end;

initialization
THorseProvider.SetKeepConnectionAlive(True);
{$ENDIF}

end.
3 changes: 3 additions & 0 deletions src/Horse.Provider.Daemon.pas
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,9 @@ class procedure THorseProvider.SetPort(const AValue: Integer);
begin
FreeAndNil(FIdHTTPWebBrokerBridge);
end;

initialization
THorseProvider.SetKeepConnectionAlive(True);
{$ENDIF}

end.
3 changes: 3 additions & 0 deletions src/Horse.Provider.VCL.pas
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ class procedure THorseProvider.SetPort(const AValue: Integer);
if FEvent <> nil then
FreeAndNil(FEvent);
end;

initialization
THorseProvider.SetKeepConnectionAlive(True);
{$ENDIF}

end.

0 comments on commit 30c0e2e

Please sign in to comment.