Public firehose endpoint ends connection after some time

I’ve noticed than when reading the public firehose endpoint with curl and using it as input for other processes, the connection is lost after some time.
Is this how it’s expected to work? Is it a known issue?

curl -H 'Authorization: Bearer 1234312312312312' https://api.spark.io/v1/events/

Hi @marianov,

Thanks for asking, yes that’s a known issue. At some point, all network connections must end. :slight_smile:

While we do try to keep that connection open as long as possible, sometimes those connections wind up closed. Nice Server-Sent-Events modules should handle reconnecting. But curl doesn’t know it should try to reconnect.

You can find details on the SSE spec here if you’re looking for a deep dive! :slight_smile:

http://www.w3.org/TR/2009/WD-eventsource-20091029/

Thanks,
David