cURL / Mailing Lists / curl-library / Single Mail


Connection seems to be dead

From: Chris Conroy <>
Date: Thu, 07 Jan 2010 19:09:52 -0500

I've made a lot of progress on the RTSP work I mentioned a few months
ago (other projects and the holidays got in the way until recently...)

But, I've hit an issue which has me stuck at the moment. Minus unit
tests, once I get past this issue I should have a patch ready for review
in very short order.

The basic code flow is that to handle interleaved RTP, I have a kind of
no-op request which doesn't send anything to the server but simply reads
any pending RTP data since this data comes outside of the normal
request->response flow.

The problem I've encountered is that, seemingly randomly, going into
this code path cause curl to throw up "Connection #x seems to be dead!"
when it runs ConnectionExists.

My best guess as to the cause is that there is some nuance I am missing
regarding readwrite_data() which says the loop there should read
everything until it would block. In this flow, I'm returning earlier
than that in order to give the application a chance to run. Looking at
the packet trace, it seems that the client (curl) side of the connection
is tossing out a RST for no good reason.

Is there some special flag I can set while returning from
readwrite_data() "early" to prevent this from happening? Or, am I
totally off base?

List admin:
Received on 2010-01-08