Diff

net/httpserver.lua @ 1053:c04b40a0740b

net.httpserver: Fix traceback when sending response to a destroyed request
author Matthew Wild <mwild1@gmail.com>
date Thu, 23 Apr 2009 21:04:56 +0100
parent 1052:a3429542631d
child 1054:084d265b37cf
child 1110:ececc4162d58
line wrap: on
line diff
--- a/net/httpserver.lua	Thu Apr 23 21:04:07 2009 +0100
+++ b/net/httpserver.lua	Thu Apr 23 21:04:56 2009 +0100
@@ -99,7 +99,7 @@
 			if response == true and not request.destroyed then
 				-- Keep connection open, we will reply later
 				log("warn", "Request %s left open, on_destroy is %s", request.id, tostring(request.on_destroy));
-			else
+			elseif response ~= true then
 				-- Assume response
 				send_response(request, response);
 				destroy_request(request);