summaryrefslogtreecommitdiff
path: root/lib/HttpServ.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/HttpServ.cc')
-rw-r--r--lib/HttpServ.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/HttpServ.cc b/lib/HttpServ.cc
index ccff319..14e48e1 100644
--- a/lib/HttpServ.cc
+++ b/lib/HttpServ.cc
@@ -419,13 +419,15 @@ HttpServ::HttpServ(Action * ap, int port, const String & nname) throw (GeneralEx
cerr << "Mini HTTP-Server '" << name << "' ready and listening for port " << port << endl;
}
+HttpServ::~HttpServ(void) {
+ Listener.close();
+}
+
int HttpServ::Do() {
try {
- Task * r;
-
Socket s = Listener.Accept();
s.SetNonBlock();
- r = new ProcessRequest(p, s, name, localport);
+ new ProcessRequest(p, s, name, localport);
}
catch (GeneralException) {
}