  	close_all_listening_sockets(ctx);
  	assert(ctx->num_listeners == 0);
  
-@@ -3751,7 +3771,15 @@
+@@ -3751,7 +3777,15 @@
  		}
  	}
  

+}
+// END BROWSERPLUS PATCH
diff -PNaur mongoose.orig/mongoose.h mongoose/mongoose.h
--- mongoose.orig/mongoose.h	2009-05-30 09:57:30.000000000 -0700
+++ mongoose/mongoose.h	2009-10-28 12:10:28.390625000 -0700
@@ -65,23 +65,55 @@
 		const struct mg_request_info *info, void *user_data);
 

 {
 	struct mg_context	*ctx;
 	const struct mg_option	*option;
@@ -4722,8 +4775,19 @@
 	(void) pthread_cond_init(&ctx->empty_cond, NULL);
 	(void) pthread_cond_init(&ctx->full_cond, NULL);
 
