> -----Ursprüngliche Nachricht----- > Von: Joe Lewis [mailto:jle...@silverhawk.net] Im Auftrag von Joe Lewis > Gesendet: Dienstag, 22. Mai 2012 17:40 > An: modules-dev@httpd.apache.org > Betreff: Re: Module: Mod_Dialup (ap_mpm_register_timed_callback) > > > > On 05/22/2012 12:27 AM, Pöchtrager, Bernhard wrote: > > Hello > > > > I am trying to work with asynchronous requests. > > With synchronous requests everything WORKS fine. > > I write it like mod_dialup.c. > > The result is that every second request is unsuccessful (The Browser is > loading the whole time). > Bernhard; > > Do you mean that the connection just appears to be loading? Does it > timeout? Or does the page successfully load? > > Do you see error messages? Are you logging anything to help debug this? > Can you share things like - what you are trying to accomplish, code, etc? > > Joe >
Thanks for your reply. The "complete" explanation was in the first e-mail (apended at the end). I write it again with more information. I am trying to work with asynchronous requests. With synchronous requests everything WORKS fine. I write it like mod_dialup.c. The result is that every second request is unsuccessful (The Browser is loading the whole time). I put some logging-code into the programm. The result ist that the first request works well. When I make a second request the handler doesn't start at all. I get no error and no logging-output. I even log the event.c file, but I get nothing. The request is loading the whole time (I think until he reachs the time-out). After I cancel the request I can make another successful request. When I make another request I have the same problem. I mean every second request is unsuccessful. I even looked with Wireshark on the packages. When the problem appears he got only a few packages. I think the problem is in the line " rv = ap_queue_pop_something(worker_queue, &csd, &cs, &ptrans, &te);" in the methode "static void *APR_THREAD_FUNC worker_thread(apr_thread_t * thd, void *dummy)" in the event.c file. I think that the first request isn't finished completely. The relevant Code of the handler is (the change from sync to async): ap_mpm_register_timed_callback(apr_time_from_msec(1000),callback,prr); return SUSPENDED; The callback method: static void callback(void* data) { request_rec* prr = (request_rec*) data; ap_finalize_request_protocol(prr); ap_process_request_after_handler(prr); } Do you have any ideas?