mod_bosh: Return if a response has been sent already (See #343)
[prosody.git] / plugins / mod_bosh.lua
index 99451754b621b58e59b464d0c1a2b2d965b45cdd..ce51ccc576b9cd96f2ad0b0961f7ebbf7c1cc429 100644 (file)
@@ -179,6 +179,8 @@ function handle_POST(event)
                else
                        return true; -- Inform http server we shall reply later
                end
+       elseif response.finished then
+               return; -- A response has been sent already
        end
        module:log("warn", "Unable to associate request with a session (incomplete request?)");
        return 400;