tatsuhiro-t / spdylay

The experimental SPDY protocol version 2, 3 and 3.1 implementation in C
http://tatsuhiro-t.github.io/spdylay/
MIT License
603 stars 102 forks source link

spdylay client submit reset frame after about 200 push streams #58

Closed life0fun closed 11 years ago

life0fun commented 11 years ago

During my stress test, I continuously push data to spdy client. After about 200 pushes, spdylay client sends reset frame to the server.

This is consistently happen for several tests.

on data chunk recv: stream id 203 before control frame send: frame type: 3 // SPDYLAY_RST_STREAM = 3,

Is there a hard code setting on the max push streams ?

life0fun commented 11 years ago

It was controlled by max concurrent streams.

define SPDYLAY_INITIAL_MAX_CONCURRENT_STREAMS 100

the num_incoming_streams only decrease inside spdylay_session_close_stream.

--session->num_incoming_streams;

However, when server push, spdylay_session_close_stream() is not called. Only called when local out stream finished.

how can I call close_stream on the server push stream, so the num_incoming_streams can be reduced.

life0fun commented 11 years ago

I just put close stream inside on_data_chunk_recv_callback and it works.

tatsuhiro-t commented 11 years ago

Make sure that the last DATA frame in pushed stream has FLAG_FIN set. If spdylay finds that, it will close the stream properly.