File tree Expand file tree Collapse file tree 3 files changed +24
-8
lines changed Expand file tree Collapse file tree 3 files changed +24
-8
lines changed Original file line number Diff line number Diff line change 1
1
-- ----------------------------------------------------------------------------
2
2
-- Ada Web Server --
3
3
-- --
4
- -- Copyright (C) 2000-2012 , AdaCore --
4
+ -- Copyright (C) 2000-2020 , AdaCore --
5
5
-- --
6
6
-- This library is free software; you can redistribute it and/or modify --
7
7
-- it under terms of the GNU General Public License as published by the --
@@ -80,9 +80,18 @@ package body AWS.Session.Control is
80
80
-- ---------
81
81
82
82
procedure Start
83
- (Session_Check_Interval : Duration; Session_Lifetime : Duration) is
83
+ (Session_Check_Interval : Duration; Session_Lifetime : Duration)
84
+ is
85
+ Init_Cleaner : Boolean;
84
86
begin
85
- Cleaner_Control.Start (Session_Check_Interval, Session_Lifetime);
87
+ Cleaner_Control.Start
88
+ (Session_Check_Interval, Session_Lifetime, Init_Cleaner);
89
+
90
+ -- Wether the cleaner task is to be initialized
91
+
92
+ if Init_Cleaner then
93
+ Cleaner_Task := new Cleaner;
94
+ end if ;
86
95
end Start ;
87
96
88
97
end AWS.Session.Control ;
Original file line number Diff line number Diff line change 1
1
-- ----------------------------------------------------------------------------
2
2
-- Ada Web Server --
3
3
-- --
4
- -- Copyright (C) 2000-2017 , AdaCore --
4
+ -- Copyright (C) 2000-2020 , AdaCore --
5
5
-- --
6
6
-- This library is free software; you can redistribute it and/or modify --
7
7
-- it under terms of the GNU General Public License as published by the --
@@ -318,14 +318,18 @@ package body AWS.Session is
318
318
-- Start --
319
319
-- ---------
320
320
321
- procedure Start (Check_Interval : Duration; Lifetime : Duration) is
321
+ procedure Start
322
+ (Check_Interval : Duration;
323
+ Lifetime : Duration;
324
+ Init_Cleaner : out Boolean) is
322
325
begin
323
326
S_Count := S_Count + 1 ;
327
+ Init_Cleaner := False;
324
328
325
329
if S_Count = 1 then
326
330
Session.Check_Interval := Start.Check_Interval;
327
331
Session.Lifetime := Real_Time.To_Time_Span (Start.Lifetime);
328
- Cleaner_Task := new Cleaner ;
332
+ Init_Cleaner := True ;
329
333
end if ;
330
334
end Start ;
331
335
Original file line number Diff line number Diff line change 1
1
-- ----------------------------------------------------------------------------
2
2
-- Ada Web Server --
3
3
-- --
4
- -- Copyright (C) 2000-2017 , AdaCore --
4
+ -- Copyright (C) 2000-2020 , AdaCore --
5
5
-- --
6
6
-- This library is free software; you can redistribute it and/or modify --
7
7
-- it under terms of the GNU General Public License as published by the --
@@ -252,7 +252,10 @@ private
252
252
253
253
protected Cleaner_Control is
254
254
255
- procedure Start (Check_Interval : Duration; Lifetime : Duration);
255
+ procedure Start
256
+ (Check_Interval : Duration;
257
+ Lifetime : Duration;
258
+ Init_Cleaner : out Boolean);
256
259
-- Launch the cleaner task the first time and does nothing after
257
260
258
261
procedure Stop (Need_Release : out Boolean);
You can’t perform that action at this time.
0 commit comments