cURL / Mailing Lists / curl-library / Single Mail


no error when server is stopped during a request with infinite timeout.

From: Bruno BARRUCAND <>
Date: Wed, 1 Apr 2015 11:59:10 +0000

I am using libcurl curl-7.34.0.
I use libcurl to receive SSE (Server Send Event).
To do that:
I set an infinite time out
I set as options
/* send all data to this function */
       curl_easy_setopt(curl_, CURLOPT_WRITEFUNCTION, write_data);

       /* send all data to this header */
       curl_easy_setopt(curl_, CURLOPT_HEADERFUNCTION, write_header);

I do curl_easy_perform() with url of sse (ex:

It works well.
But as I stop the server while connection is opened, I don't receive any information in libcurl:
No data in write_data nor in write_header.
We don't exit from curl_easy_perform. I am still locked in curl_easy_perform.

How can I have info that connection has been broken/cut?

Thank you,
Bruno Barrucand

List admin:
Received on 2015-04-01