From 94e90d7c4562080af149c21e534f1d5f10b0e271 Mon Sep 17 00:00:00 2001 From: Duncan Mac-Vicar P Date: Wed, 25 Feb 2009 00:34:13 +0100 Subject: [PATCH] check that webserver is stopped before starting --- tests/lib/WebServer.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/lib/WebServer.cc b/tests/lib/WebServer.cc index 030c6f0..4a215ed 100644 --- a/tests/lib/WebServer.cc +++ b/tests/lib/WebServer.cc @@ -160,6 +160,12 @@ public: virtual void start() { + if ( ! _stopped ) + { + MIL << "mongoose server already running, stopping." << endl; + stop(); + } + MIL << "Starting shttpd (mongoose)" << endl; _log.clear(); _ctx = mg_start(); -- 2.7.4