square/okhttp — pull request #246 by kriswuollett (2013-07-11 23:11:06+00:00)
Title: Stopped sending final empty frame on stream initiated in sender half-closed state.

The SPDY protocol states the sender of FLAG_FIN must not send further frames on that stream. This change skips the sending of a final (empty) frame with FLAG_FIN set when the stream is already half-closed because SYN_STREAM was sent with FLAG_FIN set.

Without this change OkHttp will not be able to connect to strictly conforming sites such as https://twitter.com that will reply to the extra frame with RST_STREAM with error code 9 - STREAM_ALREADY_CLOSED. The library then would continue to reconnect in a loop until memory is exhausted and the process crashes.