Fork me on GitHub

Is there a way to detect when a connection to an aleph server is closed?

Matthew Davidson (kingmob)09:04:16

Hmmm. That question has multiple possible answers. If you’re using the Aleph http client, you’ll start getting error-deferreds if you try to get responses from a closed connection, iiuc. There are certain HTTP signals that a connection is over: e.g., the “Connection: close” header means “This is the last message, closing after”, and a zero-length chunk signals the end of chunked streaming in HTTP/1.1. Likewise for TCP. But without signaling, you can’t distinguish whether a connection is dead or just really slow, so we use timeouts.

👍 1