function sendResponseCutClientAndRunPostConnectionTasks() { header("Content-Length: " . ob_get_length()); ob_end_flush(); flush(); reset($GLOBALS["POSTCONNECTIONSERVICES"]); # If post-connection services are registered, process foreach ($GLOBALS["POSTCONNECTIONSERVICES"] as $service) { $service->execute(); } session_write_close(); }