Skip to content

Commit

Permalink
Added/Updated Destructors for Httpd and Httpd::Listen.
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertPHeller committed Feb 11, 2025
1 parent 6d86609 commit 314b3e3
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/httpd/Httpd.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Author : $Author$
// Created By : Robert Heller
// Created : Sat Feb 8 19:08:26 2025
// Last Modified : <250210.1950>
// Last Modified : <250211.0855>
//
// Description
//
Expand Down Expand Up @@ -119,6 +119,12 @@ public:
/** Destructor. */
~Httpd()
{
RequestHandler* handler = firstHandler_;
while (handler) {
RequestHandler* next = handler->next();
delete handler;
handler = next;
}
}

/** Add a new URI handler to the server.
Expand Down Expand Up @@ -217,7 +223,12 @@ private:
* @param port port number to listen on
*/
Listen(Service *service, int port);

/** Destructor
*/
~Listen()
{
close(fdListen);
}
private:
/** Entry point to the state machine.
* @return next state is accept() pending an active listen socket
Expand Down

0 comments on commit 314b3e3

Please sign in to comment.