cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: sws test server with --fork

From: Joe Mason <jmason_at_rim.com>
Date: Thu, 2 Aug 2012 23:03:14 +0000

> From: curl-library [curl-library-bounces_at_cool.haxx.se] on behalf of Daniel
> Stenberg [daniel_at_haxx.se]
>
> On Wed, 1 Aug 2012, Joe Mason wrote:
>
> > My new test just stopped working even with --fork. Don't know why... I'm
> > leaning towards extending the sws server to use poll() and multiple
> > sockets
> > in the same process. That will take care of concerns about serialization
> > of
> > the log files, etc, and make sure we don't lose any state.
>
> Yes I think it is a good idea. It will also be easier to kill the server etc.

Done: see https://github.com/JoeNotCharles/curl/commits/sws_poll

Well, almost done. I didn't change send_doc, so writing to a socket will still blast data at it as fast as possible without polling for write. And I didn't touch http_connect, so tunnelled connections are still limited to one socket. Neither of these seems to cause a problem with existing tests.

There's still an intermittent bug: sometimes, if curl sends requests on socket A, then B, then A again, by the time sws reads the second request from socket A, the socket is closed (apparently due to a timeout). I added SO_KEEPALIVE to the sockets and this got much rarer, but it still happens occasionally.

Mind taking a look at this to see if you can spot anything I'm missing? I broke the work up into a bunch of commits with smaller changes that should be easier to follow (moving code into its own function in one commit, changing function return values in another, etc).

Joe

---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-08-03