diff --git a/minimal-examples/http-server/minimal-http-server-multivhost/README.md b/minimal-examples/http-server/minimal-http-server-multivhost/README.md
index 42172208438a50e7939295db532c5f2ed8cf0ad6..26c99a18b98b94ee76648b15dc083c613f717911 100644
--- a/minimal-examples/http-server/minimal-http-server-multivhost/README.md
+++ b/minimal-examples/http-server/minimal-http-server-multivhost/README.md
@@ -30,6 +30,11 @@ for the connection, and you will be served content from ./mount-origin-localhost
 
 ## usage
 
+Commandline option|Meaning
+---|---
+-d <loglevel>|Debug verbosity in decimal, eg, -d15
+--die-after-vhost | For testing failure handling
+
 ```
  $ ./lws-minimal-http-server-multivhost
 [2018/03/16 09:37:20:0866] USER: LWS minimal http server-multivhost | visit http://localhost:7681 / 7682
diff --git a/minimal-examples/http-server/minimal-http-server-multivhost/minimal-http-server.c b/minimal-examples/http-server/minimal-http-server-multivhost/minimal-http-server.c
index 57e07541bca8d8dce651646623b62cbd2e0f8c66..966616fde4a1eadccf65b19f990c341788c8bbc6 100644
--- a/minimal-examples/http-server/minimal-http-server-multivhost/minimal-http-server.c
+++ b/minimal-examples/http-server/minimal-http-server-multivhost/minimal-http-server.c
@@ -80,6 +80,11 @@ void sigint_handler(int sig)
 	interrupted = 1;
 }
 
+void vh_destruction_notification(struct lws_vhost *vh, void *arg)
+{
+	lwsl_user("%s: called, arg: %p\n", __func__, arg);
+}
+
 int main(int argc, const char **argv)
 {
 	struct lws_context_creation_info info;
@@ -150,12 +155,19 @@ int main(int argc, const char **argv)
 	info.mounts = &mount_localhost3;
 	info.error_document_404 = "/404.html";
 	info.vhost_name = "localhost3";
+	info.finalize = vh_destruction_notification;
+	info.finalize_arg = NULL;
 
 	if (!lws_create_vhost(context, &info)) {
 		lwsl_err("Failed to create third vhost\n");
 		goto bail;
 	}
 
+	if (lws_cmdline_option(argc, argv, "--die-after-vhost")) {
+		lwsl_warn("bailing after creating vhosts\n");
+		goto bail;
+	}
+
 	while (n >= 0 && !interrupted)
 		n = lws_service(context, 1000);