mirror of
https://github.com/KeyZox71/webserv.git
synced 2025-06-25 09:33:36 +02:00
「🏗️」 wip: now clearing client resource at sigint
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/05/13 18:14:45 by adjoly #+# #+# */
|
||||
/* Updated: 2025/05/29 11:34:40 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/05/29 12:07:56 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -30,7 +30,6 @@ class CgiIn : public AClientResource {
|
||||
}
|
||||
~CgiIn(void) {
|
||||
log("➖", "CgiIn", "destructor called");
|
||||
close(_fd);
|
||||
}
|
||||
|
||||
void process(void) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/05/12 17:13:39 by adjoly #+# #+# */
|
||||
/* Updated: 2025/05/27 18:40:54 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/05/29 12:08:41 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -81,6 +81,12 @@ class ResourceManager {
|
||||
}
|
||||
}
|
||||
|
||||
static void clear(void) {
|
||||
for (auto it = range (_res)) {
|
||||
delete *it;
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
private:
|
||||
static std::vector<AClientResource *> _res;
|
||||
|
Reference in New Issue
Block a user