1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-25 16:01:38 +03:00

Stopped sending 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.
This commit is contained in:
Kristopher Wuollett
2013-07-11 16:03:33 -07:00
parent 142b707313
commit 63508d956a

View File

@@ -670,7 +670,9 @@ public final class SpdyStream {
}
closed = true;
}
writeFrame(true);
if (!out.finished) {
writeFrame(true);
}
connection.flush();
cancelStreamIfNecessary();
}