faye/faye — pull request #120 by ps2 (2012-01-08 22:25:51+00:00)
Title: Detect disconnect as soon as xhr closes.

If I ctrl-c the faye server, the xhr request finishes immediately (200 response, empty body), but the xhr transport does not detect this until subsequent attempts fail.

This change causes the transport to go down (and retry) as soon as a response fails to parse.