HTTP extension beta - finally, how to handle errors in libevent pool?

From: Date: Tue, 12 Feb 2013 21:44:54 +0000
Subject: HTTP extension beta - finally, how to handle errors in libevent pool?
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-10331@lists.php.net to get a copy of this message
Hello. I have spent several hours trying to figure out how to handle exceptions caused by socket problems (timeouts for example) in curl/libevent pools. For example, say we have 200 simultaneous requests pushed into pool via Pool->attach() and executed via Pool->send(). If at least one of them fail due to timeout or whatever else, PECL_HTTP will throw an exception and stop executing all other 199 requests. How to work this out? I have tried to wrap Pool->send() call with try .. catch block and call Pool->send() after exception again, but it returns just immediately. Thanks in advance for help, Yuri Egorov.

« previous php.pecl.dev (#10331) next »